Replies: 5 comments 4 replies
-
|
... also: Is there any way to donate? Your project is awesome! |
Beta Was this translation helpful? Give feedback.
-
|
Hi, thank you for the feedback. I am not really an EJBCA expert but what you are proposing makes sense. I am thinking about a configuration option in the handler allowing to add the CN to the "username" used for enrollment (I assume that "usr_issuing-acme" is your username usually configured in So something like which would then lead to the modified enrollment configuration you described above. Would this fit your needs? |
Beta Was this translation helpful? Give feedback.
-
|
Hi again, I pushed a modified ejbca handler to the development branch. This handler adds the the CN (or first SAN) from the CSR to the user-name used in the enrollment request. It should be enough to replace your current ejbca-handler with the modified one and enable the feature via [CAhandler]
handler_file: examples/ca_handler/ejbca_ca_handler.py
...
username: usr_issuing-acme
username_append_cn: TrueThe handler works well in my environment. Hence, feel free to test and to provide feedback. /G. |
Beta Was this translation helpful? Give feedback.
-
|
Works! Although I think it would be better if you'd change username = f"{self.username}-{self._csr_cn_get(csr)}"to username = f"{self.username}{self._csr_cn_get(csr)}"i. e. removing the "forced" separator - to let the user freely choose one. Thanks so much for the quick implementation! |
Beta Was this translation helpful? Give feedback.
-
|
Tested with new docker image 0.38 - all good too. I'll change the title of the discussion and issue to reflect the real changes and close both of them. Thanks again! Edit: Can't close the issue and cannot change title either. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
when working with EJBCA, one often uses the Admin UI to search for certificates.
There, EJBCA groups issued certificate using the username ("end entity"). Usually, one would create one end entity per host, for example. This is exactly what the official EJBCA EE implementation does when enabling EJBCA - it creates one End Entity per enrollment if the Common Name/first SAN differs.
When using acme2certifier as bridge, the page would look like this:

As you can see, there's no information about the certificate's hostname or what it might belong to. One has to click through all issued certificates of this end entity to find a specific host certificate.
I circumvented this by modifying the existing EJCBA handler to add the first SAN to a hardcoded username in the _sign-method:
I took the _csr_cn_get method from the asa_ca_handler:
acme2certifier/examples/ca_handler/asa_ca_handler.py
Line 224 in 4bd861c
... and don't forget to import the CSR helper method from acme_srv.helper :)
After the change, the list looks like this - neatly grouped:

Now, to my question: Is there any more official way to achieve something like that? Maybe by using a variable in the username or something? Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions