Add pelican key create command#2380
Merged
Merged
Conversation
- What this command does is identical to `pelican generate keygen` command, which is planned to retire it in the future.
- ".pem" is the correct format (PEM, Privacy-Enhanced Mail) for private keys generated by Pelican
jhiemstrawisc
requested changes
Jun 13, 2025
jhiemstrawisc
left a comment
Member
There was a problem hiding this comment.
One other question I have is how hard it would be to tweak the default behavior of this command such that if you provide a path to an existing private key, the command:
- Warns you there's an existing file there and that it's being used instead of being overwritten
- Tries to use the existing private key to generate the public key
This would be very beneficial in cases where someone needs to get a public key from the private key. Otherwise they need to jump through a bunch of hoops just to set up an Origin and they have to know about the special /.well-known/openid-configuration web path. That's asking a lot of users.
- Rename the default private key filename to `private-key.pem` - Improve description
- If the private key file exists, it now warns the user and uses the existing key to generate the public key, instead of failing. - The public key file will still not be overwritten if it already exists. - If the private key does not exist, it is generated as before.
…mand - Rename the source code file name to migrate to the `pelican key create` command
jhiemstrawisc
requested changes
Jun 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this new command does is identical to
pelican generate keygencommand - create a pair of private/public keys. The only difference is the new private key file will be named as "issuer.pem" instead of "issuer.jwk". The new extension reflects the real format (PEM, Privacy-Enhanced Mail) of this private key file and is required by Pelican to automatically detect it in theIssuerKeysDirectory.There is no backward compatibility issue for this change because it won't affect the existing "issuer.jwk" file (which still work via the
IssuerKeyconfig param). I also updated the Pelican docs to let facilitators and users know this change. (See #2150 )pelican generate keygenis planned to retire it in the future. For now, it remains available for backward compatibility.Closes #2192