-
Notifications
You must be signed in to change notification settings - Fork 283
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
Problem about SelfCertSignerFactory class #713
Comments
HI @WindzCUHK
Anyway, suggested solution (2) sounds like a good option. Though I would make sure to include the Self part in the factory/class name to make sure the user knows these are Self Signed certs and thus not really for production use.
|
Thank you for answering. Below a few follow up questions:
|
For example, in our production environment, our Paranoids Eng team is the team running our certificate signer. It'a s complete separate service with team managing it and as such they provide the CA certificates. We just include that CA cert in your truststore and configure jetty to start up with that truststore.
|
Thank you for the answer.
|
|
|
Problems
SelfCertSignerFactory
is not registered to ZTS truststore at runtime.The client certificate issued by ZTS cannot not be verified by ZTS.
https://github.com/yahoo/athenz/blob/0c46baf5dad884b139653d649f8bfa546f96ff73/servers/zts/src/main/java/com/yahoo/athenz/zts/cert/impl/SelfCertSignerFactory.java#L75-L76
Suggested solution
1
SelfCertSignerFactory
to ZTS truststore during the start up phaseSuggested solution
2
openssl
KeyStoreCertSigner
class to issue client certificates with pre-generated CA certificate storing in a keystoreSuggested solution
3
openssl
with the same private key and subject nameSelfCertSignerFactory
classopenssl
, client certificate generated bySelfCertSigner
class should be valid when validating with the CA certificate generated byopenssl
which stored in the ZTS truststore.Problem with suggested solution
3
The client certificate works as expected when using
curl
.However, the client certificate cannot work with golang binaries (e.g. athenz-cli).
details
As the byte encoding is difference while decoded string is equal (Issuer of the client certificate V.S. Subject name of the CA certificate generated with
openssl
storing in the ZTS truststore), golang is not sending the client certificate to the ZTS server as a service identity, and causing 401 withNo credentials
in ZTS's log.https://github.com/golang/go/blob/master/src/crypto/tls/handshake_client.go#L957-L961
Questions
Crypto.java
is not supportingunencrypted PKCS #8
private key, theloadPrivateKey()
method returnsnull
and causes error inSelfCertSigner
. Is it intended?https://github.com/yahoo/athenz/blob/6d8a149a511baddfd3930dfd21afde19c132442f/libs/java/auth_core/src/main/java/com/yahoo/athenz/auth/util/Crypto.java#L557
https://github.com/yahoo/athenz/blob/0c46baf5dad884b139653d649f8bfa546f96ff73/servers/zts/src/main/java/com/yahoo/athenz/zts/cert/impl/SelfCertSignerFactory.java#L57
openssl command for private key generation
The text was updated successfully, but these errors were encountered: