File tree Expand file tree Collapse file tree 4 files changed +405
-0
lines changed
Expand file tree Collapse file tree 4 files changed +405
-0
lines changed Original file line number Diff line number Diff line change 11build
2+ _codeql_build_dir
3+ _codeql_detected_source_root
4+
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ target_link_libraries(scitokens-list-access SciTokens)
7575add_executable (scitokens-create src/create.cpp)
7676target_link_libraries (scitokens-create SciTokens)
7777
78+ add_executable (scitokens-generate-jwks src/generate_jwks.cpp)
79+ target_include_directories (scitokens-generate-jwks PRIVATE ${OPENSSL_INCLUDE_DIRS} ${LIBCRYPTO_INCLUDE_DIRS} )
80+ target_link_libraries (scitokens-generate-jwks ${OPENSSL_LIBRARIES} ${LIBCRYPTO_LIBRARIES} )
81+
7882get_directory_property (TARGETS BUILDSYSTEM_TARGETS)
7983install (
8084 TARGETS ${TARGETS}
Original file line number Diff line number Diff line change @@ -42,6 +42,30 @@ echo "<your_token_here>" | ./scitokens-verify
4242Replace the given token above with the fresh one you just generated; using the above token should give an expired
4343token error. The token must be provided via standard input (stdin).
4444
45+ Generating Keys for Testing
46+ ----------------------------
47+
48+ For testing and development purposes, you can generate EC (ES256) key pairs using the ` scitokens-generate-jwks ` tool:
49+
50+ ```
51+ ./scitokens-generate-jwks --kid my-key-id --jwks jwks.json --private private.pem --public public.pem
52+ ```
53+
54+ This generates:
55+ - ` jwks.json ` : A JWKS (JSON Web Key Set) file containing the public key
56+ - ` public.pem ` : The public key in PEM format
57+ - ` private.pem ` : The private key in PEM format
58+
59+ You can then create and verify tokens using these keys:
60+
61+ ```
62+ # Create a token
63+ ./scitokens-create --cred public.pem --key private.pem --keyid my-key-id --issuer https://my-issuer.example.com --claim "sub=testuser"
64+
65+ # Verify the token
66+ echo "<token>" | ./scitokens-verify --cred public.pem --issuer https://my-issuer.example.com --keyid my-key-id
67+ ```
68+
4569Instructions for Generating a Release
4670-------------------------------------
4771
You can’t perform that action at this time.
0 commit comments