Skip to content

Commit

Permalink
[TT-13445] Add opa support (#350)
Browse files Browse the repository at this point in the history
* Add opa support

* Apply suggestions from code review

Co-authored-by: Komal Sukhani <[email protected]>

---------

Co-authored-by: Komal Sukhani <[email protected]>
Co-authored-by: Bojan <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent ba88220 commit 7f4e7d1
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/tyk-dashboard/templates/deployment-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ spec:
- name: TYK_DB_TIB_ENABLED
value: {{ .Values.tib.enabled | quote }}
{{- end }}
- name: TYK_DB_SECURITY_OPENPOLICY_ENABLED
value: {{ .Values.dashboard.opa.enabled | quote }}
- name: TYK_DB_SECURITY_OPENPOLICY_DEBUG
value: {{ .Values.dashboard.opa.debug | quote }}
- name: TYK_DB_SECURITY_OPENPOLICY_ENABLEAPI
value: {{ .Values.dashboard.opa.api | quote }}
- name: TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
value: {{ .Values.dashboard.opa.allowAdminPasswordReset | quote }}

{{- if .Values.dashboard.extraEnvs }}
{{- include "tyk-dashboard.tplvalues.render" (dict "value" .Values.dashboard.extraEnvs "context" $) | nindent 10 }}
Expand Down
14 changes: 14 additions & 0 deletions components/tyk-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,20 @@ dashboard:
# Enable support for users with the same email for multiple organisations
# It is used to set TYK_DB_ENABLEMULTIORGUSERS
enableMultiOrgUsers: true
opa:
# Enables OPA support.
# It is used to set TYK_DB_SECURITY_OPENPOLICY_ENABLED
enabled: false
# Enables OPA debug mode which will allow more detailed logs about the policy execution.
# It is used to set TYK_DB_SECURITY_OPENPOLICY_DEBUG
debug: false
# Enables OPA API mode which allows you to manage the OPA policies via the Dashboard API
# It is used to set TYK_DB_SECURITY_OPENPOLICY_ENABLEAPI
api: false
# If OPA is enabled with its default policies, you will need to set TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
# to avoid bootstrap job failure because of the OPA policy restrictions.
# It is used to set TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
allowAdminPasswordReset: true

# replicaCount specifies number of replicas to be created if kind is Deployment.
replicaCount: 1
Expand Down
14 changes: 14 additions & 0 deletions tyk-control-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,20 @@ tyk-dashboard:
# Enable support for users with the same email for multiple organisations
# It is used to set TYK_DB_ENABLEMULTIORGUSERS
enableMultiOrgUsers: true
opa:
# Enables OPA support.
# It is used to set TYK_DB_SECURITY_OPENPOLICY_ENABLED
enabled: false
# Enables OPA debug mode which will allow more detailed logs about the policy execution.
# It is used to set TYK_DB_SECURITY_OPENPOLICY_DEBUG
debug: false
# Enables OPA API mode which allows you to manage the OPA policies via the Dashboard API
# It is used to set TYK_DB_SECURITY_OPENPOLICY_ENABLEAPI
api: false
# If OPA is enabled with its default policies you will need to set TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
# to avoid bootstrap job failure because of the OPA policy restrictions.
# It is used to set TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
allowAdminPasswordReset: true


# replicaCount specifies number of replicas to be created if kind is Deployment.
Expand Down
15 changes: 15 additions & 0 deletions tyk-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,21 @@ tyk-dashboard:
# Enable support for users with the same email for multiple organisations
# It is used to set TYK_DB_ENABLEMULTIORGUSERS
enableMultiOrgUsers: true
# Manage dashboard API Open Policy Agent(OPA) support
opa:
# Enables OPA support.
# It is used to set TYK_DB_SECURITY_OPENPOLICY_ENABLED
enabled: false
# Enables OPA debug mode which will allow more detailed logs about the policy execution.
# It is used to set TYK_DB_SECURITY_OPENPOLICY_DEBUG
debug: false
# Enables OPA API mode which allows you to manage the OPA policies via the Dashboard API
# It is used to set TYK_DB_SECURITY_OPENPOLICY_ENABLEAPI
api: false
# If OPA is enabled with its default policies you will need to set TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
# to avoid bootstrap job failure because of the OPA policy restrictions.
# It is used to set TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
allowAdminPasswordReset: true

# replicaCount specifies number of replicas to be created if kind is Deployment.
replicaCount: 1
Expand Down

0 comments on commit 7f4e7d1

Please sign in to comment.