-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add TLS CLI commands #41418
Add TLS CLI commands #41418
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
59d4145
to
3c4a793
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3c4a793
to
035364d
Compare
This comment has been minimized.
This comment has been minimized.
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
035364d
to
02e470d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took so long.
Most of the comments are related to the doc but... there are some other important comments.
alias in the keystore | ||
-p, --password=<password> | ||
The password of the keystore. Default is 'password' | ||
-r, --renew Whether existing certificates will need to be replaced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it have value to be able to generate a certificate from a given CA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean a CA you already own? I would need the private key. I would rather not do that for security reasons.
extensions/tls-registry/cli/src/main/java/io/quarkus/tls/cli/GenerateCertificateCommand.java
Outdated
Show resolved
Hide resolved
build-parent/pom.xml
Outdated
<dependency> | ||
<groupId>me.escoffier.certs</groupId> | ||
<artifactId>certificate-generator</artifactId> | ||
<version>0.7.1</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should move these projects to the Quarkus or the SmallRye org. And same for the groupId.
For tests, it was mostly OK but I wouldn't be comfortable with having some CLI/runtime stuff hosted outside of our community namespaces. And this especially since they are security components.
Both for security and for the future.
I won't require this to get the PR in but we need to have a plan and a deadline for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still the goal. I would go to SmallRye as the project has a lot of tests, and I don't want to use Quarkus CI time for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will work on something tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #41665
Do not resolve this conversation - once the mentioned PR is merged, there is some work to do to transition to this new dependency.
02e470d
to
cd74175
Compare
cd74175
to
ce023ec
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -8,3 +8,5 @@ metadata: | |||
unlisted: true | |||
config: | |||
- "quarkus.tls." | |||
cli-plugins: | |||
- "${project.groupId}:quarkus-tls-registry-cli:${project.version}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "${project.groupId}:quarkus-tls-registry-cli:${project.version}" | |
- tls: "${project.groupId}:quarkus-tls-registry-cli:${project.version}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of #40580 we can prefix the maven coordinates with an alias.
In this case tls:
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the changes.
cli-plugins:
- "tls: ${project.groupId}:quarkus-tls-registry-cli:${project.version}"
extensions/tls-registry/cli/src/main/java/io/quarkus/tls/cli/TlsCommand.java
Outdated
Show resolved
Hide resolved
> quarkus tls-registry | ||
Install and Manage TLS development certificates | ||
Usage: tls-registry [COMMAND] | ||
Commands: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could optionally pull the generate-
prefix as an intermediate sub-command:
quarkus tls generate qukarus-ca
quarkus tls generate certificate
```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. What's the recommendation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would keep it as it is for now. They are fundamentally different operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ce023ec
to
50c1b41
Compare
This comment has been minimized.
This comment has been minimized.
@cescoffier I think you will need to update this one with the new artifacts. |
@gsmet Yes! On it! |
This commit introduces two new CLI commands to enhance TLS management: - Generate and install a Quarkus Development CA. - Create certificates, either signed with the generated CA or unsigned. As the generated certificates are generated in ``$project-directory/.certs`, this directory is added to the generated .gitignore. The CLI uses the new alias supported added in quarkusio#40580, and thus the commands are behind: `quarkus tls`
50c1b41
to
da8d7a9
Compare
@gsmet Done. |
Status for workflow
|
Status for workflow
|
This PR introduces two new CLI commands to enhance TLS management:
Fix #41010