ibm-sam

by Helm

Helm chartv1.1.0App 9.0.7.0Apache-2.0

IBM Security Access Manager provides a simplified access management solution.

About this chart

IBM Security Access Manager

Introduction

In a world of highly fragmented access management environments, IBM Security Access Manager helps you simplify your users' access while more securely adopting web, mobile and cloud technologies. This solution helps you strike a balance between usability and security through the use of risk-based access, single sign-on, integrated access management control, identity federation and its mobile multi-factor authentication capability, IBM Verify. Take back control of your access management with IBM Security Access Manager.

Chart Details

This chart will deploy an IBM Security Access Manager environment. This environment will consist of a number of different containers, namely:

ContainerPurpose
isamconfigThis container provides the Web console which can be used to configure the environment.
isamwrpThis container provides a secure Web Reverse Proxy. This should serve as the network entry point into the environment.
isamrtThis container provides the runtime services of the Advanced Access Control and Federation offerings. This is an optional part of the environment and is only required if AAC or Federation capabilities are required.
isamdscThis container provides the distributed session cache server. It is an optional component and is only required if user sessions need to be shared across multiple containers.
isampostgresqlThis container provides a sample database which can be used by IBM Security Access Manager. It is not designed to be used in production and should only ever be used in development or proof of concept environments.

Prerequisites

Docker Identity

The chart will make use of the ISAM docker image, which is available on Docker Store: https://store.docker.com/images/ibm-security-access-manager.

In order to be able to access the ISAM docker image in Docker Store:

  1. A docker account (user identity and password) must be available. A docker account can be created by following the instructions found at: https://docs.docker.com/docker-id/.

  2. The docker account must be registered with the ISAM image in Docker Store. This can be achieved by accessing the Web page for the ISAM docker image (https://store.docker.com/images/ibm-security-access-manager), selecting the 'Proceed to Checkout' link and then accepting the terms and conditions.

  3. A secret must be created which contains the docker account information. This secret should be supplied as the global.imageCredentials.dockerSecret configuration parameter. The simplest way to create the secret is to use the kubectl command:

    kubectl create secret docker-registry <secret-name> \
               --docker-username=<username> --docker-password=<password> \
               --docker-email=<e-mail> 
    

Administrator Password

The administrator password will reside within a Kubernetes secret, with a secret key of 'adminPassword'. If no secret is supplied to the chart via the global.container.imageSecret configuration parameter a new secret will be automatically generated which contains a randomly generated password.

The simplest way to create the secret is to use the kubectl command:

kubectl create secret generic <secret-name> --from-literal=adminPassword=<password> 

PersistentVolumeClaim Requirements

A Persistent Volume Claim is required if persistence is enabled and no dynamic provisioning has been set up. You can create a persistent volume claim through a yaml file. For example:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: <persistent volume name>
spec:
  storageClassName: <storage class name>
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi

To create the persistent volume using a file called pv.yaml:

$ kubectl create -f pv.yaml

PodSecurityPolicy Requirements

This chart requires a PodSecurityPolicy to be bound to the target namespace prior to installation. Choose either a predefined PodSecurityPolicy or have your cluster administrator setup a custom PodSecurityPolicy for you:

  • Predefined PodSecurityPolicy name: ibm-anyuid-psp
  • Custom PodSecurityPolicy definition:
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
  annotations:
    kubernetes.io/description: "This policy allows pods to run with 
      any UID and GID, but preventing access to the host."
  name: ibm-sam-nonroot-psp
spec:
  allowPrivilegeEscalation: true
  fsGroup:
    rule: RunAsAny
  requiredDropCapabilities: 
  - ALL
  allowedCapabilities:
  - CHOWN
  - DAC_OVERRIDE
  - FOWNER
  - KILL
  - NET_BIND_SERVICE
  - SETFCAP
  - SETGID
  - SETUID
  runAsUser:
    rule: MustRunAsNonRoot
  seLinux:
    rule: RunAsAny
  supplementalGroups:
    rule: RunAsAny
  volumes:
  - configMap
  - emptyDir
  - projected
  - secret
  - downwardAPI
  - persistentVolumeClaim
  forbiddenSysctls: 
  - '*' 

To create a security policy using a file called sec_policy.yaml:

$ kubectl create -f sec_policy.yaml
  • Custom ClusterRole for the custom PodSecurityPolicy:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  annotations:
  name: ibm-sam-nonroot-clusterrole
rules:
- apiGroups:
  - extensions
  resourceNames:
  - ibm-sam-nonroot-psp
  resources:
  - podsecuritypolicies
  verbs:
  - use

To create a cluster role using a file called cluster_role.yaml:

$ kubectl create -f cluster_role.yaml
  • Custom ClusterRoleBinding for the custom ClusterRole:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: ibm-sam-nonroot-rolebinding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: ibm-sam-nonroot-clusterrole
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: Group
  name: system:serviceaccounts:{{ NAMESPACE }}

The '{{ NAMESPACE }}' string in the cluster role should be replaced with the namespace of the target environment.

To create a cluster role binding using a file called cluster_role_binding.yaml:

$ kubectl create -f cluster_role_binding.yaml

Resources Required

The minimum resources required for each of the container types are:

ContainerMinimum MemoryMinimum CPU
isamconfig1Gi1000m
isamwrp512Mi500m
isamrt1Gi1000m
isamdsc512Mi500m
isampostgresql512Mi500m

Installing the Chart

To install the chart with the release name my-release:

$ helm install --tls --name my-release ibm-sam

This command deploys the ISAM image on the Kubernetes cluster using the default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list --tls

Verifying the Chart

See the instruction after the helm installation completes for chart verification. The instruction can also be displayed by viewing the installed helm release under Menu -> Workloads -> Helm Releases or by running the command: helm status <release> --tls.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release --purge --tls

The command removes all of the Kubernetes components associated with the chart and deletes the release.

When deleting a release with stateful sets the associated persistent volume will need to be deleted. Execute the following command after deleting the chart release to clean up orphaned Persistent Volumes.

$ kubectl delete pvc -l release=my-release

Configuration

The following tables list the configurable parameters of the ISAM chart, along with their default values.

Global

ParameterDescriptionDefault
global.image.repositoryThe image repository.store/ibmcorp/isam
global.image.dbrepositoryThe image repository for the postgresql server.ibmcom/isam-postgresql
global.image.tagThe image version. This helm chart is compatible with ISAM v9.0.7.0 and later.9.0.7.0
global.image.pullPolicyThe image pull policy.IfNotPresent
global.imageCredentials.dockerSecretThe name of an existing secret which contains the Docker Store credentials.(none)
global.container.snapshotThe name of the configuration data snapshot that is to be used when starting the container. This will default to the latest published configuration.latest published snapshot
global.container.fixpacksA space-separated, ordered list of fix packs to be applied when starting the container. If this environment variable is not present, any fix packs present in the fixpacks directory of the configuration volume will be applied in alphanumeric order.all available fix packs
global.container.adminSecretThe name of an existing secret which contains the administrator password (key: adminPassword). If no secret is supplied a new secret will be created with a randomly generated password.(none)
global.container.autoReloadIntervalThe interval, in seconds, that the runtime containers will wait before checking to see if any new configuration is available.disabled
global.persistence.enabledWhether to use a PVC to persist data.true
global.persistence.useDynamicProvisioningWhether the requested volume will be automatically provisioned if dynamic provisioning is available.true

Configuration Service

ParameterDescriptionDefault
isamconfig.resources.requests.memoryThe amount of memory to be allocated to the configuration service.1Gi
isamconfig.resources.requests.cpuThe amount of CPU to be allocated to the configuration service.1000m
isamconfig.resources.limits.memoryThe maximum amount of memory to be used by the configuration service.2Gi
isamconfig.resources.limits.cpuThe maximum amount of CPU to be used by the configuration service.2000m
isamconfig.service.typeThe service type for the configuration service.NodePort
isamconfig.dataVolume.existingClaimNameThe name of an existing PersistentVolumeClaim to be used.empty
isamconfig.dataVolume.storageClassNameThe storage class of the backing PVC.empty
isamconfig.dataVolume.sizeThe size of the data volume.20Gi

Web Reverse Proxy Service

ParameterDescriptionDefault
isamwrp.container.instancesAn array of instance names to be created.-default
isamwrp.container.replicasThe number of replicas to start for each unique secure Web Reverse Proxy instance.1
isamwrp.resources.requests.memoryThe amount of memory to be allocated to each Web Reverse Proxy instance.512Mi
isamwrp.resources.requests.cpuThe amount of CPU to be allocated to each replica of each Web Reverse Proxy instance.500m
isamwrp.resources.limits.memoryThe maximum amount of memory to be used by each replica of each Web Reverse Proxy instance.1Gi
isamwrp.resources.limits.cpuThe maximum amount of CPU to be used by each replica of each Web Reverse Proxy instance.1000m
isamwrp.service.typeThe service type for the Web Reverse Proxy instances.NodePort

Runtime Service

ParameterDescriptionDefault
isamruntime.container.enabledWhether the federation and advanced access control runtime is required.false
isamruntime.container.replicasThe number of replicas to start of the runtime service.1
isamruntime.resources.requests.memoryThe amount of memory to be allocated to the runtime service.1Gi
isamruntime.resources.requests.cpuThe amount of CPU to be allocated to each replica of the runtime service.1000m
isamruntime.resources.limits.memoryThe maximum amount of memory to be used by each replica of the runtime service.2Gi
isamruntime.resources.limits.cpuThe maximum amount of CPU to be used by each replica of the runtime service.2000m

Distributed Session Cache

ParameterDescriptionDefault
isamdsc.container.enabledWhether the distributed session cache service is required.false
isamdsc.container.useReplicaWhether the distributed session cache service should be replicated for HA.true
isamdsc.resources.requests.memoryThe amount of memory to be allocated to the distributed session cache service.512Mi
isamdsc.resources.requests.cpuThe amount of CPU to be allocated to each replica of the distributed session cache service.500m
isamdsc.resources.limits.memoryThe maximum amount of memory to be used by each replica of the distributed session cache service.1Gi
isamdsc.resources.limits.cpuThe maximum amount of CPU to be used by each replica of the distributed session cache service.1000m

Database

ParameterDescriptionDefault
isampostgresql.container.enabledWhether the demonstration PostgreSQL service is required.false
isampostgresql.container.keySecretAn existing secret which contains the server.pem to be used by the server. If no secret is supplied the server will only support 'unsecure' communication. The certificate file can be added as a secret using the following command: kubectl create secret generic <secret-name> --from-file server.pem.empty
`isampo

Deploy ibm-sam with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-sam on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartibm-sam is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply