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

[WFCORE-4362] Make the certificate authority used by a certificate-au… #192

Merged
merged 1 commit into from Jun 21, 2019

Conversation

Skyllarr
Copy link
Contributor

@Skyllarr Skyllarr commented Apr 1, 2019

…thority-account configurable

In the Elytron subsystem, LetsEncrypt is a value of CertificateAuthority enum. This enum contains name, url and staging url.
We can add new `certificate-authority` resource to the elytron
subsystem with non-optional attributes `name`, `production-url` and optional attribute `staging-url`.
This way, during the configuration of `certificate-authority-account`
Copy link
Contributor

Choose a reason for hiding this comment

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

Making the staging-url optional is ok. However, when implementing this, just double check the ACME related code in both Core and Elytron to see if any additional null checks should be added to avoid NPEs since with Let's Encrypt, we were able to assume both urls would be non-null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fjuma Looking at the code and you are right, it will be necessary to add null checks on a few places. I will keep this in mind during implementation. Thank you!


== Test Plan

Functionality tests added to Elytron testsuite.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a minor clarification, the functionality tests will be added to the Elytron tests in the Core testsuite, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fjuma yes, I specified tests plan more.


=== QE Contacts

* mailto:mchoma@redhat.com[Martin Choma]

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

@Skyllarr Other parts of analysis LGTM, so I will approve it once this will be changed ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


Currently, `certificate-authority-account` contains optional attribute `certificate-authority` of type STRING.
The default and only allowed value is "LetsEncrypt".
We should be able to specify staging URL and production URL without breaking backwards compatibility.

Choose a reason for hiding this comment

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

@Skyllarr (cc @fjuma) When implementing this, to keep backward compatibility, double check the configuration from WF14 works correctly. So LetsEncrypt should works also without <certificate-authority name="LetsEncrypt" ... section in WF configuration.


In the Elytron subsystem, LetsEncrypt is a value of CertificateAuthority enum. This enum contains name, url and staging url.
We can add new `certificate-authority` resource to the elytron
subsystem with non-optional attributes `name`, `url` and optional attribute `staging-url`.

Choose a reason for hiding this comment

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

Just a minor comment: name is probably not an attribute of certificate-authority resource, right? I'm trying your implementation:

[standalone@localhost:9990 /] /subsystem=elytron/certificate-authority=Buypass:read-attribute(name=<TAB>
staging-url  url  
[standalone@localhost:9990 /] /subsystem=elytron/certificate-authority=Buypass:read-attribute(name=name)
{
    "outcome" => "failed",
    "failure-description" => "WFLYCTL0201: Unknown attribute 'name'",
    "rolled-back" => true
}

[standalone@localhost:9990 /] 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marekkopecky In your example, name has value "Buypass". When you define certificate-authority in the standalone.xml, it looks like this:

<certificate-authorities>
    <certificate-authority name="Buypass" url="http://www.test.com"/>
</certificate-authorities>

I think CLI in this case is searching through attributes of resource Buypass specifically, which does not contain additional name attribute.

Choose a reason for hiding this comment

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

@Skyllarr Ok, thank you for the explanation.

Copy link

@marekkopecky marekkopecky left a comment

Choose a reason for hiding this comment

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

Approving last changes of this analysis.

@darranl darranl merged commit edc3a25 into wildfly:master Jun 21, 2019
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.

None yet

4 participants