Quick question about keystore (jks) requirement #10784
-
Hello fellow cloudstack users/admins. I had a quick question concerning JKS requirements. From what I understand, this is the join procedure from an agent's viewpoint:
Is there a way to disable this functionality? We are in PoC stage and starting to fully automate a lot of these prereqs. We have some custom tooling around Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
@dcontiveros-nf I believe setting the value for global configuration ca.plugin.root.auth.strictness should help. cc @weizhouapache |
Beta Was this translation helpful? Give feedback.
-
@rajujith That variable did not work for connecting to We are trying to add nodes out of band, meaning we want to set them up in an automatic fashion with no access to GUI. This shouldn't be a problem as the docs specifically state that we would need to run some commands here(Personal opinion, I believe this needs to be rewritten so as to not conflict with the Out-Of-Band management that is brought up earlier in that doc. https://docs.cloudstack.apache.org/en/4.20.0.0/adminguide/hosts.html#securing-process We attempted to replicate this procedure utilizing only key-tool, but could not get this to connect. I also searched the docs for any PKI related information that would possibly point to how to properly do this, but I did not find anything. What I need now is some direction to do the following:
Ideally I think it would be amazing if ACS could do:
I can provide any followups necessary. If I need to enter a Bug/Feature request I can also do that. Edit: I am aware I could setup a MVP, dump the keystores, and then replicate what gets actioned. However, this doesn't guarantee that the procedure will break later on on upgrades. I rather avoid going this route. |
Beta Was this translation helpful? Give feedback.
-
A few updates here on where I am at in this process: Goal Blocker Investigation Issue 1 #4199 (comment) It appears this particular individual is automating creation of a PKCS#12 file with their certs, converting that to a JKS store, and then configuring Netty/Nio to use it. I attempted to create a Netty compatible JKS keystore with the following order (same as the comment):
We have an existing pfx bundle and I did check the keystore had the above order but I still received SSL handshake errors via Nio on the Agent side:
That last part of the management node is of relevance because of this issue: This implies that adding a KVM node is necessary via GUI, but we are attempting to automate this completely. Specifying Issue 2 Issue 3
It appears the code to do this is performed with the utility scripts in this path:
Upon inspecting this file it appears that on registration, the manager will SSH into the host, run this script, setup a Issue 4
This matches code in:
This makes me believe that prior to deployment we need to stage valid certs with additional aliases based on our Root CA for all agents/hypervisor nodes. Now again, this JKS file was from a single node cluster. I understand there may be some differences in how the JKS will ultimately look in a distributed fashion. Conclusion Any feedback is appreciated. I did post on Slack and saw these messages get sent out to the mailing list, so any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
currently when provision a host key, cloudstack will generate a cert/key/jks for cloudstack-agent.
these are also used by libvirt . you may have noticed in the script
it is easy, you just need to remove the symblink and use your own key.
I think it is possible (but I never tested it) you can find the RSA public/private key and ca certificate by DB query
these values are encrypted by db secret key, you can decrypt the value, please refer to
ca.plugin.root.auth.strictness should be false |
Beta Was this translation helpful? Give feedback.
@dcontiveros-nf
currently when provision a host key, cloudstack will generate a cert/key/jks for cloudstack-agent.
these are also used by libvirt . you may have noticed in the script
scripts/util/keystore-cert-import
it is easy, you just need to remove the symblink and use your own key.
do not forget to remove the
ln -sf
in the scriptscripts/util/keystore-cert-import
I think it is possible (but I never tested it)
please bear in mind that the cert/key/jks are generated with a RSA key…