Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add keypair generation command #817

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

bpolaszek
Copy link
Contributor

@bpolaszek bpolaszek commented Dec 19, 2020

Hello there,

I'd like to remove the most annoying part of the bundle installation: leverage openssl extension to generate the key pair in a one-liner 🙂

If you like this one, with the -n option, we could update the flex recipe (unfamiliar with this, but I assume that's doable) so that public / private keys are generated on the fly during composer install.

Thoughts?
Ben

@chalasr
Copy link
Collaborator

chalasr commented Dec 19, 2020

Hey,

Don't worry about the failing build, it will go away with PHP 5.6 support in #816.
I'm going to think about the best way to leverage this with flex, but I'm 👍 on the idea.
Thanks for the PR.

Command/GenerateKeyPairCommand.php Outdated Show resolved Hide resolved
Command/GenerateKeyPairCommand.php Outdated Show resolved Hide resolved
Resources/config/console.xml Outdated Show resolved Hide resolved
Resources/config/console.xml Outdated Show resolved Hide resolved
@bpolaszek bpolaszek force-pushed the feature/keypair-generation branch 4 times, most recently from 9b47099 to 952322a Compare January 1, 2021 17:35
@bpolaszek bpolaszek requested a review from chalasr January 1, 2021 17:40
Command/GenerateKeyPairCommand.php Outdated Show resolved Hide resolved
Command/GenerateKeyPairCommand.php Outdated Show resolved Hide resolved
Command/GenerateKeyPairCommand.php Outdated Show resolved Hide resolved
@chalasr chalasr self-requested a review January 12, 2021 19:03
Copy link
Collaborator

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks a lot.
I will try it as soon as I have some more time before merging.

@bpolaszek
Copy link
Contributor Author

Thanks @chalasr 👍

@chalasr chalasr changed the base branch from master to 2.x February 9, 2021 13:55
@chalasr
Copy link
Collaborator

chalasr commented Feb 9, 2021

It took time, but here we go, this is in now. Thank you very much @bpolaszek.

@chalasr chalasr merged commit 02a8f68 into lexik:2.x Feb 9, 2021
@bpolaszek
Copy link
Contributor Author

No worries / no hurries, thank you for taking the time to review this 🙂

@bpolaszek bpolaszek deleted the feature/keypair-generation branch February 9, 2021 17:25
@drupol
Copy link
Contributor

drupol commented Feb 9, 2021

Thanks for the feature!

@fd6130
Copy link

fd6130 commented Feb 10, 2021

So this command will still use openssl to generate keypair?

*/
private $algorithm;

public function __construct(Filesystem $filesystem, string $secretKey, string $publicKey, ?string $passphrase, string $algorithm)
Copy link

@gggeek gggeek Feb 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks if either secretKey or publicKey are not set in the config, as the dep. injection / xml svc config will pass in NULL values and not ''.

I dunno anything about this bundle, but the doc seems to state that both secretKey and publicKey are optional...

Shall I file a ticket ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants