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

mTLS authn method #301

Merged
merged 7 commits into from
Jun 14, 2022
Merged

mTLS authn method #301

merged 7 commits into from
Jun 14, 2022

Commits on Jun 10, 2022

  1. mTLS authentication method

    Implements Mutual Transport Layer Security (mTLS) identity verification in Authorino.
    
    Trusted root Certificate Authorities (CA) certificates are stored as Kubernetes TLS Secrets, fetched and cached by Authorino, silimarly to how API key Secrets are handled. Label selectors and namespace/cluster scope are encoraged to be used.
    
    It works for both interfaces, i.e. the gRPC Envoy protocol-based authorization interface and the raw HTTP authorization interface.
    
    For integrations via Envoy, mTLS authn set as well in Authorino might be seen as redundant and only meaninful for the purpose of combining multiple authentication methods and/or for counting on better structured subject data to apply normalization. For simple use cases, Authorino's 'plain' identity method can be used instead, fetching Envoy-injected principal information (extracted from the client cert) from `context.request.source.principal`.
    guicassolato committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    a9076aa View commit details
    Browse the repository at this point in the history
  2. K8s Secret-based identity interface and controller methods renamed so…

    … they are less specific about API keys
    guicassolato committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    463e93b View commit details
    Browse the repository at this point in the history
  3. Refactor API key secret identity evaluator

    - Modified names of variables, pointers, imports - to have a better base for the implementation of the mTLS identity evaluator with propeor reconciliation of k8s secrets
    - Fixed label of log values for the name of secret
    guicassolato committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    0458d91 View commit details
    Browse the repository at this point in the history
  4. Reconciliation of trusted mTLS root CA cert k8s secrets

    Refreshes the entire list of cached root CA certs by reloading them all again from the cluster at any operation (add, update, delete secret).
    This is because `x509.CertPool` does not provide a good interface for deleting and updating the list of certificates in the pool, despite its convinient `.AppendCertsFromPEM` function.
    To allow better management of the cache (i.e., addition, update and deletion of individual k8s secrets to avoid reloading all secrets, using the qualified name `<namespace>/<name>` of the resource as key), another data structure to store the trusted root CA certs must replace the type of `rootCerts: *x509.CertPool`.
    guicassolato committed Jun 10, 2022
    Configuration menu
    Copy the full SHA
    d48785e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1b391d0 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2022

  1. Configuration menu
    Copy the full SHA
    8a8c676 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2022

  1. [docs] mTLS authn

    guicassolato committed Jun 13, 2022
    Configuration menu
    Copy the full SHA
    6fe79a8 View commit details
    Browse the repository at this point in the history