ibm-sam
by Helm
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:
| Container | Purpose |
|---|---|
| isamconfig | This container provides the Web console which can be used to configure the environment. |
| isamwrp | This container provides a secure Web Reverse Proxy. This should serve as the network entry point into the environment. |
| isamrt | This 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. |
| isamdsc | This 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. |
| isampostgresql | This 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:
-
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/.
-
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.
-
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:
| Container | Minimum Memory | Minimum CPU |
|---|---|---|
| isamconfig | 1Gi | 1000m |
| isamwrp | 512Mi | 500m |
| isamrt | 1Gi | 1000m |
| isamdsc | 512Mi | 500m |
| isampostgresql | 512Mi | 500m |
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
| Parameter | Description | Default |
|---|---|---|
global.image.repository | The image repository. | store/ibmcorp/isam |
global.image.dbrepository | The image repository for the postgresql server. | ibmcom/isam-postgresql |
global.image.tag | The image version. This helm chart is compatible with ISAM v9.0.7.0 and later. | 9.0.7.0 |
global.image.pullPolicy | The image pull policy. | IfNotPresent |
global.imageCredentials.dockerSecret | The name of an existing secret which contains the Docker Store credentials. | (none) |
global.container.snapshot | The 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.fixpacks | A 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.adminSecret | The 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.autoReloadInterval | The interval, in seconds, that the runtime containers will wait before checking to see if any new configuration is available. | disabled |
global.persistence.enabled | Whether to use a PVC to persist data. | true |
global.persistence.useDynamicProvisioning | Whether the requested volume will be automatically provisioned if dynamic provisioning is available. | true |
Configuration Service
| Parameter | Description | Default |
|---|---|---|
isamconfig.resources.requests.memory | The amount of memory to be allocated to the configuration service. | 1Gi |
isamconfig.resources.requests.cpu | The amount of CPU to be allocated to the configuration service. | 1000m |
isamconfig.resources.limits.memory | The maximum amount of memory to be used by the configuration service. | 2Gi |
isamconfig.resources.limits.cpu | The maximum amount of CPU to be used by the configuration service. | 2000m |
isamconfig.service.type | The service type for the configuration service. | NodePort |
isamconfig.dataVolume.existingClaimName | The name of an existing PersistentVolumeClaim to be used. | empty |
isamconfig.dataVolume.storageClassName | The storage class of the backing PVC. | empty |
isamconfig.dataVolume.size | The size of the data volume. | 20Gi |
Web Reverse Proxy Service
| Parameter | Description | Default |
|---|---|---|
isamwrp.container.instances | An array of instance names to be created. | -default |
isamwrp.container.replicas | The number of replicas to start for each unique secure Web Reverse Proxy instance. | 1 |
isamwrp.resources.requests.memory | The amount of memory to be allocated to each Web Reverse Proxy instance. | 512Mi |
isamwrp.resources.requests.cpu | The amount of CPU to be allocated to each replica of each Web Reverse Proxy instance. | 500m |
isamwrp.resources.limits.memory | The maximum amount of memory to be used by each replica of each Web Reverse Proxy instance. | 1Gi |
isamwrp.resources.limits.cpu | The maximum amount of CPU to be used by each replica of each Web Reverse Proxy instance. | 1000m |
isamwrp.service.type | The service type for the Web Reverse Proxy instances. | NodePort |
Runtime Service
| Parameter | Description | Default |
|---|---|---|
isamruntime.container.enabled | Whether the federation and advanced access control runtime is required. | false |
isamruntime.container.replicas | The number of replicas to start of the runtime service. | 1 |
isamruntime.resources.requests.memory | The amount of memory to be allocated to the runtime service. | 1Gi |
isamruntime.resources.requests.cpu | The amount of CPU to be allocated to each replica of the runtime service. | 1000m |
isamruntime.resources.limits.memory | The maximum amount of memory to be used by each replica of the runtime service. | 2Gi |
isamruntime.resources.limits.cpu | The maximum amount of CPU to be used by each replica of the runtime service. | 2000m |
Distributed Session Cache
| Parameter | Description | Default |
|---|---|---|
isamdsc.container.enabled | Whether the distributed session cache service is required. | false |
isamdsc.container.useReplica | Whether the distributed session cache service should be replicated for HA. | true |
isamdsc.resources.requests.memory | The amount of memory to be allocated to the distributed session cache service. | 512Mi |
isamdsc.resources.requests.cpu | The amount of CPU to be allocated to each replica of the distributed session cache service. | 500m |
isamdsc.resources.limits.memory | The maximum amount of memory to be used by each replica of the distributed session cache service. | 1Gi |
isamdsc.resources.limits.cpu | The maximum amount of CPU to be used by each replica of the distributed session cache service. | 1000m |
Database
| Parameter | Description | Default |
|---|---|---|
isampostgresql.container.enabled | Whether the demonstration PostgreSQL service is required. | false |
isampostgresql.container.keySecret | An 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartibm-sam is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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