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

Moved client cert checking into Authenticator #273

Merged
merged 2 commits into from Jul 6, 2016
Merged

Conversation

chirino
Copy link
Contributor

@chirino chirino commented Jul 5, 2016

Also support enabling client cert and other auth modes at the same time.

…or client certs is implemented as an Authenticator instead.

Partially implements jolokia#223, but it retains backward compatibility with the current configuration.
… is used when you enable basic auth and client cert based auth at the same time.
for (Rdn rdn : principal.getRdns()) {
if (!certPrincipalRdns.contains(rdn)) {
throw new SecurityException("Principal " + certPrincipal + " not allowed");
}
Copy link
Member

Choose a reason for hiding this comment

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

I will take over the fix from the other PR here.

@rhuss
Copy link
Member

rhuss commented Jul 6, 2016

LGTM, thanks ;)

I will update the documentation accordingly. A new Jolokia release (1.3.4) is expected at the end of this or beginning of next week.

@rhuss rhuss merged commit 9670a6d into jolokia:master Jul 6, 2016
@rhuss
Copy link
Member

rhuss commented Jul 6, 2016

There will be still a problem for our use case, since the client certificate will be validated still that is signed by a CA. This happens before the authenticators are called, when setting up the HTTPS subsystem.

So I'm afraid that its not possible to have SSL with allowing both, client cert authentication and basic authentication without a prior client cert verification.

The authenticator is used only for some extra checks, like whether the presented certificate is indeed a client certificate (and not a server certificate), and whether the enclosed principal matches a configured value.

The check, whether a client cert is presented and whether it is signed by a given CA (stored in the keystore) happens before, internally in the HttpsServer which we cant influence much except for configuring it.

@chirino
Copy link
Contributor Author

chirino commented Jul 6, 2016

Yeah I think that limitation is ok. In the case a client does not have cert trusted by the CA, he should not do SSL with the cert at all.

@rhuss
Copy link
Member

rhuss commented Jul 6, 2016

But how can you provide a Pod specific client cert signed by the OpenShift CA when running from a Pod ?

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

2 participants