Authorization v2.0

Dell Technologies (Dell) Container Storage Modules (CSM) for Authorization v2.0 Helm deployment

Docker Hub images are discontinued. All deployments will be using images from quay.io.

Authorization can be installed by using the provided Helm v3 charts on Kubernetes platforms.

The following Authorization components are installed in the specified namespace:

  • proxy-service, which forwards requests from the CSI Driver to the backend storage array
  • tenant-service, which configures tenants, role bindings, and generates JSON Web Tokens
  • role-service, which configures roles for tenants to be bound to
  • storage-service, which configures backend storage arrays for the proxy-server to forward requests to

The following third-party components are installed in the specified namespace:

  • redis, which stores data regarding tenants and their volume ownership, quota, and revokation status
  • redis-commander, a web management tool for Redis

The following third-party components are optionally installed in the specified namespace:

  • cert-manager, which optionally provides a self-signed certificate to configure the Authorization Ingresses
  • nginx-ingress-controller, which fulfills the Authorization Ingresses

Storage system credentials can be provided in one of two ways:

  1. Using a SecretProviderClass (for dynamic secrets from external providers)
  2. Using a Kubernetes Secret (for static credentials)

Install Container Storage Modules Authorization

  1. Create the Authorization namespace.

    kubectl create namespace authorization
    
  2. Add the Dell Helm Charts repo

    helm repo add dell https://dell.github.io/helm-charts
    
  3. Configure Storage Credentials

  • Ensure the Secrets Store CSI Driver is installed and configured with an External Secret Provider. For guidance refer to our installation and configuration guide.

  • Create your own SecretProviderClass Object based on your external secret provider. You also have the option to create your own Redis secret in the SecretProviderClass.


Minimal SecretProviderClass configuration: includes only array-based credentials
SecretProviderClass configuration with array-based and Redis credentials
  • Create a YAML file (in this example, storage-secret.yaml) containing the credentials:

    # Username and password for accessing storage system
    username: "username"
    password: "password"
    

  • Create the Secret:

    kubectl create secret generic storage-secret -n authorization --from-file=storage-secret.yaml
    

Note: Only one of SecretProviderClass or Secret can be used at a time.


  1. Prepare samples/authorization/config.yaml which contains the JWT signing secret. The following table lists the configuration parameters.

    Parameter Description Required Default
    web.jwtsigningsecret String used to sign JSON Web Tokens true secret

    Example:

    web:
      jwtsigningsecret: randomString123
    
  • Ensure the Secrets Store CSI Driver is installed and configured with an External Secret Provider. For guidance refer to our installation and configuration guide.

  • Create your JWT signing secret within your chosen External Secret Provider. Paste the contents of this file as the secret content.

  • Create your own SecretProviderClass Object based on your external secret provider. You also have the option to create your own Redis secret in the SecretProviderClass.


SecretProviderClass configuration with array-based, Redis, and config credentials

After editing the file, run the following command to create a secret called karavi-config-secret:


kubectl create secret generic karavi-config-secret -n authorization --from-file=config.yaml=samples/csm-authorization/config.yaml

Use the following command to replace or update the secret:


kubectl create secret generic karavi-config-secret -n authorization --from-file=config.yaml=samples/csm-authorization/config.yaml -o yaml --dry-run=client | kubectl replace -f -

Note: Only one of SecretProviderClass or Secret can be used at a time.


  1. Copy the default values.yaml file cp charts/csm-authorization-v2.0/values.yaml myvalues.yaml

  2. Look over all the fields in myvalues.yaml and fill in/adjust any as needed.

    Parameter
  1. Install the module using helm:

To install Authorization with the service Ingresses using your own certificate, run:

helm -n authorization install authorization -f myvalues.yaml charts/csm-authorization-v2.0 \
--set-file authorization.certificate=<location-of-certificate-file> \
--set-file authorization.privateKey=<location-of-private-key-file>

To install Authorization with the service Ingresses using a self-signed certificate generated via cert-manager, run:

helm -n authorization install authorization -f myvalues.yaml charts/csm-authorization-v2.0

Install Dellctl

Note: Karavictl will not work with Authorization v2.x. Please use dellctl instead.

Follow the instructions for Installing dellctl.

Installing and configuring the Secrets Store CSI Driver with an External Secret Provider

  • Install a supported External Secret Provider to integrate with the Secrets Store CSI Driver. For guidance on setting up Vault, refer to our Vault installation guide. For Conjur, refer to our Conjur installation guide.

  • Install the Secrets Store CSI Driver enabling the Sync as Kubernetes Secret and Secret Auto Rotation features.

    Note: If you are using Conjur with the Secrets Store CSI Driver, be sure to configure --set 'tokenRequests[0].audience=conjur' when installing the Secrets Store CSI Driver.

  • For OpenShift environments, label the namespace:

    kubectl label namespace authorization \
     pod-security.kubernetes.io/enforce=privileged \
     security.openshift.io/MinimallySufficientPodSecurityStandard=privileged \
     --overwrite
    

Configuring the Authorization Proxy Server

Follow the instructions available in Authorization for Configuring the Authorization Proxy Server.

Configuring a Dell CSI Driver with Container Storage Modules for Authorization

Follow the instructions available in Authorization for

Updating Container Storage Modules for Authorization Proxy Server Configuration

Authorization has a subset of configuration parameters that can be updated dynamically:

Parameter Type Default Description
web.jwtsigningsecret String “secret” The secret used to sign JWT tokens

Updating configuration parameters can be done by editing the karavi-config-secret. The secret can be queried using k3s and kubectl like so:

kubectl -n authorization get secret/karavi-config-secret

To update parameters, you must edit the base64 encoded data in the secret. The karavi-config-secret data can be decoded like so:


kubectl -n authorization get secret/karavi-config-secret -o yaml | grep config.yaml | head -n 1 | awk '{print $2}' | base64 -d

Save the output to a file or copy it to an editor to make changes. Once you are done with the changes, you must encode the data to base64. If your changes are in a file, you can encode it like so:

cat <file> | base64

Copy the new, encoded data and edit the karavi-config-secret with the new data. Run this command to edit the secret:

kubectl -n karavi edit secret/karavi-config-secret

Replace the data in config.yaml under the data field with your new, encoded data. Save the changes and Authorization will read the changed secret.

Note: If you are updating the signing secret, the tenants need to be updated with new tokens via the dellctl generate token command.

CSM for Authorization Proxy Server Dynamic Configuration Settings

Some settings are not stored in the karavi-config-secret but in the csm-config-params ConfigMap, such as LOG_LEVEL and LOG_FORMAT. To update the Authorization logging settings during runtime, run the below command, make your changes, and save the updated configMap data.

kubectl -n authorization edit configmap/csm-config-params

This edit will not update the logging level for the sidecar-proxy containers running in the CSI Driver pods. To update the sidecar-proxy logging levels, you must update the associated CSI Driver ConfigMap in a similar fashion:


kubectl -n [CSM_CSI_DRIVER_NAMESPACE] edit configmap/<release_name>-config-params

Using PowerFlex as an example, kubectl -n vxflexos edit configmap/vxflexos-config-params can be used to update the logging level of the sidecar-proxy and the driver.