This commit is contained in:
@@ -45,17 +45,6 @@ config :commanded_ecto_projections,
|
|||||||
|
|
||||||
config :flop, repo: PolicyService.Repo
|
config :flop, repo: PolicyService.Repo
|
||||||
|
|
||||||
config :policy_service, :zitadel,
|
|
||||||
issuer: System.get_env("ZITADEL_ISSUER", "https://id.corredorconnect.com"),
|
|
||||||
client_id: System.get_env("ZITADEL_CLIENT_ID"),
|
|
||||||
client_secret: System.get_env("ZITADEL_CLIENT_SECRET"),
|
|
||||||
roles_claim: "urn:zitadel:iam:org:project:#{System.get_env("ZITADEL_PROJECT_ID")}:roles",
|
|
||||||
required_scopes: [
|
|
||||||
"openid",
|
|
||||||
"profile",
|
|
||||||
"urn:zitadel:iam:org:project:#{System.get_env("ZITADEL_PROJECT_ID")}:roles"
|
|
||||||
]
|
|
||||||
|
|
||||||
# Import environment specific config. This must remain at the bottom
|
# Import environment specific config. This must remain at the bottom
|
||||||
# of this file so it overrides the configuration defined above.
|
# of this file so it overrides the configuration defined above.
|
||||||
import_config "#{config_env()}.exs"
|
import_config "#{config_env()}.exs"
|
||||||
|
|||||||
@@ -41,16 +41,6 @@ config :cors_plug,
|
|||||||
origin: cors_origin
|
origin: cors_origin
|
||||||
|
|
||||||
# Zitadel Configuration
|
# Zitadel Configuration
|
||||||
config :policy_service, :zitadel,
|
|
||||||
issuer: System.get_env("ZITADEL_ISSUER", "https://id.corredorconnect.com"),
|
|
||||||
client_id: System.get_env("ZITADEL_CLIENT_ID"),
|
|
||||||
client_secret: System.get_env("ZITADEL_CLIENT_SECRET"),
|
|
||||||
roles_claim: "urn:zitadel:iam:org:project:#{System.get_env("ZITADEL_PROJECT_ID")}:roles",
|
|
||||||
required_scopes: [
|
|
||||||
"openid",
|
|
||||||
"profile",
|
|
||||||
"urn:zitadel:iam:org:project:#{System.get_env("ZITADEL_PROJECT_ID")}:roles"
|
|
||||||
]
|
|
||||||
|
|
||||||
# ## Using releases
|
# ## Using releases
|
||||||
#
|
#
|
||||||
@@ -108,4 +98,15 @@ if config_env() == :prod do
|
|||||||
port: String.to_integer(System.get_env("PORT", "4000"))
|
port: String.to_integer(System.get_env("PORT", "4000"))
|
||||||
],
|
],
|
||||||
secret_key_base: secret_key_base
|
secret_key_base: secret_key_base
|
||||||
|
|
||||||
|
config :policy_service, :zitadel,
|
||||||
|
issuer: System.get_env("ZITADEL_ISSUER", "https://id.corredorconect.com"),
|
||||||
|
client_id: System.get_env("ZITADEL_CLIENT_ID"),
|
||||||
|
client_secret: System.get_env("ZITADEL_CLIENT_SECRET"),
|
||||||
|
roles_claim: "urn:zitadel:iam:org:project:#{System.get_env("ZITADEL_PROJECT_ID")}:roles",
|
||||||
|
required_scopes: [
|
||||||
|
"openid",
|
||||||
|
"profile",
|
||||||
|
"urn:zitadel:iam:org:project:#{System.get_env("ZITADEL_PROJECT_ID")}:roles"
|
||||||
|
]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ defmodule PolicyService.Application do
|
|||||||
# for more information on OTP Applications
|
# for more information on OTP Applications
|
||||||
@moduledoc false
|
@moduledoc false
|
||||||
|
|
||||||
@zitadel Application.fetch_env!(:policy_service, :zitadel)
|
@zitadel Application.get_env(:policy_service, :zitadel)
|
||||||
|
|
||||||
use Application
|
use Application
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ defmodule PolicyServiceWeb.Router do
|
|||||||
alias PolicyServiceWeb.PolicyController
|
alias PolicyServiceWeb.PolicyController
|
||||||
alias PolicyServiceWeb.HealthController
|
alias PolicyServiceWeb.HealthController
|
||||||
|
|
||||||
@zitadel Application.fetch_env!(:policy_service, :zitadel)
|
@zitadel Application.get_env(:policy_service, :zitadel)
|
||||||
|
|
||||||
pipeline :api do
|
pipeline :api do
|
||||||
plug OpenApiSpex.Plug.PutApiSpec, module: PolicyServiceWeb.ApiSpec
|
plug OpenApiSpex.Plug.PutApiSpec, module: PolicyServiceWeb.ApiSpec
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ controllers:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ include "bjw-s.common.lib.chart.names.fullname" $ }}-apiapp-client-secret'
|
name: '{{ include "bjw-s.common.lib.chart.names.fullname" $ }}-apiapp-client-secret'
|
||||||
key: clientSecret
|
key: clientSecret
|
||||||
|
|
||||||
ZITADEL_PROJECT_ID:
|
ZITADEL_PROJECT_ID:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|||||||
Reference in New Issue
Block a user