Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions charts/aserto/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ dependencies:
- name: aserto-lib
repository: file://../aserto-lib
version: 0.2.1
digest: sha256:3f436ac7dfb9062fb8fb780d8bee9d03c72cfb871e1b53de562f277ddfc6d493
generated: "2025-01-20T10:06:46.030495-05:00"
- name: multi-tenant-scim
repository: file://../multi-tenant-scim
version: 0.0.1
digest: sha256:dd5cc7966bdbc8c5cb731339a97d2ef3d1764b81e8aa624ea76abdc539824093
generated: "2025-01-24T11:04:50.423851638+02:00"
4 changes: 4 additions & 0 deletions charts/aserto/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ dependencies:
- name: aserto-lib
version: 0.2.1
repository: file://../aserto-lib
- name: multi-tenant-scim
version: 0.0.1
repository: file://../multi-tenant-scim
condition: multi-tenant-scim.enabled
2 changes: 1 addition & 1 deletion charts/authorizer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Local cluster address
OPA discovery configuration
*/}}
{{- define "authorizer.opaDiscovery" -}}
url: https://{{ include "aserto-lib.discoveryAddress" . }}/api/
url: http://{{ include "aserto-lib.discoveryAddress" . }}/api/
credentials:
bearer:
token: ${AUTHORIZER_DISCOVERY_ROOT_KEY}
Expand Down
2 changes: 1 addition & 1 deletion charts/console/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
value: {{ include "console.port" . | quote }}
{{- with (include "aserto-lib.controllerClient" .) | fromYaml }}
- name: DS0_SERVICE_URL
value: {{ .address }}
value: {{ .no_tls | default false | ternary "http" "https" }}://{{ .address }}
- name: DS0_TENANT_ID
value: {{ .tenant_id }}
{{- end }}
Expand Down
29 changes: 29 additions & 0 deletions charts/controller/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,28 @@ stringData:
- /grpc.reflection.v1.ServerReflection/ServerReflectionInfo
- /grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo
- /aserto.directory.reader.v3.Reader/Check
- /aserto.directory.store.v2.Store/GetAPIKeyIdentity
- /aserto.directory.store.v2.Store/ListUserTenants

tenant_id_field:
id:
- /aserto.directory.store.v2.Store/Info
- /aserto.directory.store.v2.Store/ListTenantMembers
tenant_id:
- /aserto.directory.store.v2.Store/AssignRoleToTenant
- /aserto.directory.store.v2.Store/CreateAPIKey
- /aserto.directory.store.v2.Store/DeleteAPIKey
- /aserto.directory.store.v2.Store/DeleteConfig
- /aserto.directory.store.v2.Store/DeleteSecret
- /aserto.directory.store.v2.Store/GetAPIKeyIdentity
- /aserto.directory.store.v2.Store/GetConfig
- /aserto.directory.store.v2.Store/GetSecret
- /aserto.directory.store.v2.Store/ListAPIKeys
- /aserto.directory.store.v2.Store/ListConfigs
- /aserto.directory.store.v2.Store/ListSecrets
- /aserto.directory.store.v2.Store/RemoveRoleFromTenant
- /aserto.directory.store.v2.Store/SetConfig
- /aserto.directory.store.v2.Store/SetSecret
{{- end }}

authentication:
Expand Down Expand Up @@ -135,3 +157,10 @@ stringData:
oidc: true
{{- end }}

{{- with .Values.secretsVault }}
secrets_vault:
address: {{ .address }}
insecure: {{ .insecure | default false }}
root_path: {{ .rootPath | default "/" }}
token: ""
{{- end }}
15 changes: 15 additions & 0 deletions charts/controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,21 @@ spec:
key: password
{{- end }}

{{- if .Values.secretsVault }}
{{- if .Values.secretsVault.token }}
- name: DIRECTORY_SECRETS_VAULT_TOKEN
value: {{ .Values.secretsVault.token }}
{{- else -}}
{{- with .Values.secretsVault.tokenSecret }}
- name: DIRECTORY_SECRETS_VAULT_TOKEN
valueFrom:
secretKeyRef:
name: {{ .name }}
key: {{ .key }}
{{- end }}
{{- end }}
{{- end }}

{{- range $_, $tenant := .Values.tenants -}}
{{- with $tenant.keysSecret }}
- name: {{ printf "TENANT_%s_WRITER_KEY" (replace "." "_" $tenant.name | upper) }}
Expand Down
2 changes: 1 addition & 1 deletion charts/controller/test/no-tls.values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
image:
tag: 0.33.11-b041fc2e-amd64
tag: 0.33.11-108fc18c-amd64

imagePullSecrets:
- name: ghcr-creds
Expand Down
2 changes: 1 addition & 1 deletion charts/controller/test/tls.values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
image:
tag: 0.33.11-b041fc2e-amd64
tag: 0.33.11-108fc18c-amd64

imagePullSecrets:
- name: ghcr-creds
Expand Down
12 changes: 12 additions & 0 deletions charts/controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ tenants:
# writerKey: writer
# readerKey: reader

# secretsVault:
# [Optional] Vault token
# token: ""
# [Optional] Kubernetes secret containing the vault token
# tokenSecret:
# # Secret name
# name: ""
# # Secret key
# key: "token"
# address: "https://127.0.0.1:8200"
# rootPath: "/"
# insecure: true

# Set the service log level (trace/debug/info/warn/error).
# The default is 'info'.
Expand Down
1 change: 0 additions & 1 deletion charts/directory/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,3 @@ stringData:
- /aserto.directory.store.v2.Store/PurgeDeletedTenants
authenticators_enabled:
root_key: true

2 changes: 1 addition & 1 deletion charts/directory/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ spec:
readOnly: true
{{- end }}
env:
{{- with include "directory.controllerKeyEnv" (list . "read") }}
{{- with include "directory.controllerKeyEnv" (list . "readStore") }}
- name: DIRECTORY_CONTROLLER_CLIENT_API_KEY
{{- . | nindent 14 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/directory/test/no-tls.values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
image:
tag: 0.33.11-b041fc2e-amd64
tag: 0.33.11-108fc18c-amd64

imagePullSecrets:
- name: ghcr-creds
Expand Down
2 changes: 1 addition & 1 deletion charts/directory/test/tls.values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
image:
tag: 0.33.11-b041fc2e-amd64
tag: 0.33.11-108fc18c-amd64

imagePullSecrets:
- name: ghcr-creds
Expand Down
1 change: 0 additions & 1 deletion charts/discovery/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ stringData:
{{- end }}

{{- with .Values.oidc -}}
foobar: no
oidc:
{{- include "aserto-lib.oidcConfig" . | nindent 8 }}
{{- end }}
Expand Down
32 changes: 13 additions & 19 deletions charts/discovery/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -31,24 +32,16 @@ spec:
items:
- key: config.yaml
path: config.yaml
{{- with (include "aserto-lib.grpcConfig" . | fromYaml).certSecret }}
- name: grpc-certs
{{- with include "aserto-lib.grpcConfig" . | fromYaml }}
{{- if .certSecret }}
secret:
secretName: {{ .certSecret }}
{{- else }}
emptyDir: {}
{{- end }}
{{- end }}
secretName: {{ . }}
{{- end }}
{{- with (include "aserto-lib.httpsConfig" . | fromYaml).certSecret }}
- name: https-certs
{{- with (include "aserto-lib.httpsConfig" . | fromYaml) }}
{{- if .certSecret }}
secret:
secretName: {{ .certSecret }}
{{- else }}
emptyDir: {}
{{- end }}
{{- end }}
secretName: {{ . }}
{{- end }}

{{- with ((include "aserto-lib.controllerClientCfg" . | fromYaml).caCertSecret).name }}
- name: controller-grpc-certs
Expand Down Expand Up @@ -77,16 +70,17 @@ spec:
- name: config
mountPath: /config
readOnly: true
{{- with (include "aserto-lib.grpcConfig" . | fromYaml).certSecret }}
- name: grpc-certs
mountPath: /grpc-certs
{{- if (include "aserto-lib.grpcConfig" . | fromYaml).certSecret }}
readOnly: true
{{- end }}
{{- end }}
{{- with (include "aserto-lib.httpsConfig" . | fromYaml).certSecret }}
- name: https-certs
mountPath: /https-certs
{{- if (include "aserto-lib.httpsConfig" . | fromYaml).certSecret }}
readOnly: true
{{- end }}
{{- end }}


{{- with ((include "aserto-lib.controllerClientCfg" . | fromYaml).caCertSecret).name }}
- name: controller-grpc-certs
Expand All @@ -102,7 +96,7 @@ spec:
key: {{ .secretKey }}
{{- end }}

{{- with include "aserto-lib.controllerKeyEnv" (list . "read") }}
{{- with include "aserto-lib.controllerKeyEnv" (list . "readStore") }}
- name: DISCOVERY_DS0_API_KEY
{{- . | nindent 14 }}
{{- end }}
Expand Down
5 changes: 1 addition & 4 deletions charts/discovery/test/no-tls.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ apiKey:

controller:
address: "topaz.discovery-no-tls.svc.cluster.local:8282"
apiKeys:
read: controller-root-key
write: controller-root-key
store: controller-root-key
apiKeysSecret: controller-keys
noTLS: true

registries:
Expand Down
6 changes: 6 additions & 0 deletions charts/discovery/test/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ tests:
- name: discovery-ghcr-token
values:
token: ghuser:$GITHUB_TOKEN
- name: controller-keys
values:
read: controller-root-key
write: controller-root-key
readStore: controller-root-key
writeStore: controller-root-key
run:
- |
${TOPAZ:-topaz} ds set manifest charts/discovery/test/manifest.yaml \
Expand Down
23 changes: 23 additions & 0 deletions charts/multi-tenant-scim/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions charts/multi-tenant-scim/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: aserto-lib
repository: file://../aserto-lib
version: 0.2.1
digest: sha256:83c950a4ee60c07dbc8e045f6645365ca35eced4f1aa329f51c8e2de1de28f93
generated: "2025-01-22T16:42:47.031829421+02:00"
35 changes: 35 additions & 0 deletions charts/multi-tenant-scim/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
apiVersion: v2
name: multi-tenant-scim
description: A Helm chart for the Aserto Multi Tenant SCIM Gateway
icon: https://www.aserto.com/images/aserto-logo.png

maintainers:
- name: Aserto
url: https://github.com/aserto-dev

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.1"

dependencies:
- name: aserto-lib
version: 0.2.1
repository: file://../aserto-lib
22 changes: 22 additions & 0 deletions charts/multi-tenant-scim/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "multi-tenant-scim.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "multi-tenant-scim.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "multi-tenant-scim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "multi-tenant-scim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export HTTPS_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
export GRPC_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[1].containerPort}")
echo "gRPC Service exposed on http://127.0.0.1:8282"
echo "REST Service exposed on http://127.0.0.1:8383"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8282:$GRPC_PORT 8383:$HTTPS_PORT
{{- end }}
Loading