curved-florist-98287
11/30/2023, 6:42 AMchilly-king-10285
11/30/2023, 6:42 AMchilly-king-10285
11/30/2023, 6:43 AMaccess-rules.yml file. This rule should require a valid session before allowing requests to the dashboard. Here is an example of such a rule: yaml - id: "ory:kratos-selfservice-ui-node:protected" upstream: preserve_host: true url: "<http://kratos-selfservice-ui-node:4435>" match: url: "<http://127.0.0.1:4455/<{debug,dashboard,settings}{/,}>>" methods: - GET authenticators: - handler: cookie_session authorizer: handler: allow mutators: - handler: id_token errors: - handler: redirect config: to: <http://127.0.0.1:4455/login> In this rule, the authenticators section uses the cookie_session handler, which checks if a valid session exists. If a valid session is found, the user is considered authenticated. The authorizer section uses the allow handler, which means that all authenticated requests are allowed. If the user is not authenticated, the errors section comes into play. The redirect handler is used to redirect unauthenticated users to a specified URL, in this case, <http://127.0.0.1:4455/login>. Please replace the URLs and other parameters according to your application's requirements. For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/guides/zero-trust-iap-proxy-identity-access-proxy).