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

Unable to use host id-based k8s authentication with container name annotation #1535

Closed
micahlee opened this issue May 7, 2020 · 0 comments
Closed

Comments

@micahlee
Copy link
Contributor

micahlee commented May 7, 2020

Summary

In the k8s authenticator, if the authenticator container is defined as authn-k8s/authentication-container-name: authenticator, but the host still uses host id-based authentication, rather than annotation-based, then the inject-client-cert request will fail with:

CONJ00045E Host does not have a namespace constraint

This is because the check for annotation-based authentication only checks for the authn-k8s/ prefix, rather than the presence of specific identification annotions:

def application_identity_in_annotations?
@application_identity_in_annotations ||= @host_annotations.select { |a| a.values[:name].start_with?("authn-k8s/") }.any?
end

Expected Results

Annotation-based authentication should check for the specific presence of the allowed identity annotations defined in:

def permitted_constraints
@permitted_constraints ||= %w(
namespace service_account pod deployment stateful_set deployment_config
)

A clear and concise description of what you expected to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants