From 1111c45bc1af19e19553e4ef405c13b3f32864d8 Mon Sep 17 00:00:00 2001 From: jjeroch <94133633+jjeroch@users.noreply.github.com> Date: Sun, 7 Jan 2024 18:06:34 +0100 Subject: [PATCH 1/4] docs[security]: generic security.md enhanced by intro and user login session limitation docu --- .../10. Generic Security.md | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/technical documentation/10. Generic Security.md b/docs/technical documentation/10. Generic Security.md index 6b01dda2..c526ecfa 100644 --- a/docs/technical documentation/10. Generic Security.md +++ b/docs/technical documentation/10. Generic Security.md @@ -1,5 +1,24 @@ ## Security Generic +This document serves as a introduce the security config of the catena-x refernce implementation with Keycloak. The settings outlined are designed to provide a robust security framework for test environments - ensuring the integrity, confidentiality, and availability of our system and data. + +Disclaimer: +The configurations suggested in this file are starting points and should be adapted to meet the specific security requirements of your environment. It's important to regularly review and update these settings to adapt to new threats and changing organizational needs. + +Please proceed with caution and consult security experts as needed when implementing these configurations. + +- [Host](#host) +- [Bruce Force Detection](#bruce-force-detection) +- [Clickjacking](#clickjacking) +- [Open Redirections](#open-redirections) +- [Compromised Authorization code](#compromised-authorization-code) +- [Compromised access and refresh tokens](#compromised-access-and-refresh-tokens) +- [CSRF attack](#csrf-attack) +- [Limiting Scope - Client Token](#limiting-scope---client-token) +- [Client Policies](#client-policies) +- [Limiting User Sessions](#limiting-user-sessions) + + ### Host Keycloak uses the public hostname in several ways, such as within token issuer fields and URLs in password reset emails. @@ -44,14 +63,15 @@ Common Parameters - Lock after 10 subsequent login failures - 1 second between failures (too quick for a human) -- Lock remains active for ~5 min +- Lock remains active for ~15 min ##### Preventing manual attacks - Lock after 10 subsequent login failures - Sliding window of 12 hours -- Lock remains active for ~ 45 min +- Lock remains active for ~ 15 min +Brute force detectation activation is highly recommended and cinfigures as part of the refernce solution. ### Clickjacking @@ -123,6 +143,20 @@ For any clients in CX, the scope is limited to the client scope. tbd +### Limiting User Sessions + +With the possibility "Limiting User Session" the number of sessions a user can run at once can get limited. When a user reaches the user session limit, they must end their current user sessions before they begin a new session. + +As part of the reference solution - the limit is not configured - it is up to the respective operator and env. owner to decide if the session limit is used/configured. +If a configuration is planned, the limit needs to get configured as part of the realm authnetication flow setup. + +![Tokens](/docs/static/authenticationflow.png) + +The flow that you must configure depends on how you authenticate users: +- Configure a browser flow if you use local or LDAP/AD authentication +- Configure a post-sign in client flow if you use SSO + + ## NOTICE This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). From 76c1c64127d34eab8bf5aa354c3cf3b13da13d99 Mon Sep 17 00:00:00 2001 From: jjeroch <94133633+jjeroch@users.noreply.github.com> Date: Sun, 7 Jan 2024 18:10:44 +0100 Subject: [PATCH 2/4] doc[image]: added authentication flow image --- docs/static/authenticationflow.png | Bin 0 -> 14468 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/static/authenticationflow.png diff --git a/docs/static/authenticationflow.png b/docs/static/authenticationflow.png new file mode 100644 index 0000000000000000000000000000000000000000..1c8119eea519157785d066b074ca370506b9fe75 GIT binary patch literal 14468 zcmd73byOWq^eqU41Pj3uNN|UsL4&(%aJOK=_2MqUf?hPZy9al7cXxMpczyYP@6D|F zch;IU&`H->RCm=m)m>G4pWQ(}WJHk>u@Rx5ppeDIgyf;1pi_WyE&My+|B2_|2;c;5 zCod`hRWgjb2N-^as^Uh{(oj@D86N5_G&g?Q0ndN&*_^|CHsSDgUPq z3=~v=2^8%A)KLe{ke}Bk{?GYM8ub5l$26G#T^l+j?alu#L)Ahqvu$lF1x^UoVrq6! zP?%(pf6(Icq^D3&-xI`z_!XU?kCNe%q;_t)M=Dg6)spkZT(M|{CYh5z67vfMGJo|D zKt-b!ra}{MJD-30bNSQNJQ!BY3s#J<6@e7-^vv$|zZ%-)d~0Wn)~uqC>fSP5 z?HIc&P+_T%s*O@!?Hh)x=3x*6CK<|~VzdPsmlq)d3c)D>%D-ozbq*I|z;Zw%%BFd~ zVe>#IghoGQghmXH^R8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I z%S_b`c=+snwb)RDTNk2TNP2N?f7cXTbeA){a34CE z`H*S3KcPrNa2-l zc_*T{*H2t=9Hm>{uv$6{QWA9SR|Lh9z{@lpm&VHWc)+UG)=<55c1~H51?yg>0lf9A%vB;0KoE4s{Gw}W#o8?00Ib%)Mg1#F~A2>0Cfi2 zAG6K&$~MUY?A+s~KpD;}6GaJdPu{lK>@u(X)&J+swTVYj#B_>-=jd(Lu_zJ%w;%^0 z5d!R|QdJU0;>SOlbxu4)3wleC-U5d%tk1}ELpbIC)ND0_t?k}mnKTc4y$}lU<`Ey_ m^#6O2 Date: Sun, 7 Jan 2024 18:12:37 +0100 Subject: [PATCH 3/4] docs[image]: license file added --- docs/static/authenticationflow.png.license | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/static/authenticationflow.png.license diff --git a/docs/static/authenticationflow.png.license b/docs/static/authenticationflow.png.license new file mode 100644 index 00000000..7eb90696 --- /dev/null +++ b/docs/static/authenticationflow.png.license @@ -0,0 +1,5 @@ +This work is licensed under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode). + +- SPDX-License-Identifier: CC-BY-4.0 +- SPDX-FileCopyrightText: Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/portal-assets From 8578cf110cebd10be61a47bc829c5120279d30cc Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Mon, 8 Jan 2024 11:22:01 +0100 Subject: [PATCH 4/4] chore: fix typos --- .../10. Generic Security.md | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/docs/technical documentation/10. Generic Security.md b/docs/technical documentation/10. Generic Security.md index c526ecfa..6449de03 100644 --- a/docs/technical documentation/10. Generic Security.md +++ b/docs/technical documentation/10. Generic Security.md @@ -1,6 +1,6 @@ ## Security Generic -This document serves as a introduce the security config of the catena-x refernce implementation with Keycloak. The settings outlined are designed to provide a robust security framework for test environments - ensuring the integrity, confidentiality, and availability of our system and data. +This document serves as a introduction for the security config of the catena-x reference implementation with Keycloak. The settings outlined are designed to provide a robust security framework for test environments - ensuring the integrity, confidentiality, and availability of our system and data. Disclaimer: The configurations suggested in this file are starting points and should be adapted to meet the specific security requirements of your environment. It's important to regularly review and update these settings to adapt to new threats and changing organizational needs. @@ -10,7 +10,7 @@ Please proceed with caution and consult security experts as needed when implemen - [Host](#host) - [Bruce Force Detection](#bruce-force-detection) - [Clickjacking](#clickjacking) -- [Open Redirections](#open-redirections) +- [Open Redirects](#open-redirects) - [Compromised Authorization code](#compromised-authorization-code) - [Compromised access and refresh tokens](#compromised-access-and-refresh-tokens) - [CSRF attack](#csrf-attack) @@ -18,7 +18,6 @@ Please proceed with caution and consult security experts as needed when implemen - [Client Policies](#client-policies) - [Limiting User Sessions](#limiting-user-sessions) - ### Host Keycloak uses the public hostname in several ways, such as within token issuer fields and URLs in password reset emails. @@ -27,7 +26,6 @@ By default, the hostname derives from the request header. No validation exists t The hostname’s Service Provider Interface (SPI) provides a way to configure the hostname for requests. You can use this built-in provider to set a fixed URL for frontend requests while allowing backend requests based on the request URI. If the built-in provider does not have the required capability, you can develop a customized provider. - ### Bruce Force Detection A brute force attack happens when an attacker is trying to guess a user’s password multiple times. Keycloak has some limited brute force detection capabilities. If turned on, a user account will be temporarily disabled if a threshold of login failures is reached. To enable this feature go to the Realm Settings left menu item, click on the Security Defenses tab, then additional go to the Brute Force Detection sub-tab. @@ -40,7 +38,6 @@ When a user is temporarily locked and attempts to log in, {project_name} display Details: https://www.keycloak.org/docs/latest/server_admin/index.html#password-guess-brute-force-attacks - Config: 1. Click Realm Settings in the menu @@ -51,12 +48,10 @@ Brute force detection ![BruteForce](/docs/static/brute-force.png) - Common Parameters ![CommonParameters](/docs/static/common-parameters.png) - #### Catena-X configuration ##### Preventing automated attacks @@ -71,7 +66,7 @@ Common Parameters - Sliding window of 12 hours - Lock remains active for ~ 15 min -Brute force detectation activation is highly recommended and cinfigures as part of the refernce solution. +Brute force detection activation is highly recommended and configures as part of the reference solution. ### Clickjacking @@ -88,14 +83,12 @@ In the Admin Console, you can specify the values of the X-FRAME_OPTIONS and Cont By default, Keycloak sets up a same-origin policy for iframes. - -### Open redirections +### Open redirects An open redirector is an endpoint using a parameter to automatically redirect a user agent to the location specified by the parameter value without validation. An attacker can use the end-user authorization endpoint and the redirect URI parameter to use the authorization server as an open redirector, using a user’s trust in an authorization server to launch a phishing attack. Keycloak requires that all registered applications and clients register at least one redirection URI pattern. When a client requests that Keycloak performs a redirect, Keycloak checks the redirect URI against the list of valid registered URI patterns. Clients and applications must register as specific a URI pattern as possible to mitigate open redirector attacks. - ### Compromised Authorization code For the OIDC Auth Code Flow, Keycloak generates a cryptographically strong random value for its authorization codes. An authorization code is used only once to obtain an access token. @@ -106,7 +99,6 @@ You can also defend against leaked authorization codes by applying Proof Key for -- not yet considered in CX -- - ### Compromised access and refresh tokens Keycloak includes several actions to prevent malicious actors from stealing access tokens and refresh tokens. The crucial action is to enforce SSL/HTTPS communication between {project_name} and its clients and applications. {project_name} does not enable SSL by default. @@ -117,7 +109,6 @@ In the current project phase, we will proceed with the default values for the to ![Tokens](/docs/static/tokens.png) - ### CSRF attack A Cross-site request forgery (CSRF) attack uses HTTP requests from users that websites have already authenticated. Any site using cookie-based authentication is vulnerable to CSRF attacks. You can mitigate these attacks by matching a state cookie against a posted form or query parameter. @@ -128,7 +119,6 @@ The {project_name} Admin Console is a JavaScript/HTML5 application that makes RE The user account management section in {project_name} can be vulnerable to CSRF. To prevent CSRF attacks, {project_name} sets a state cookie and embeds the value of this cookie in hidden form fields or query parameters within action links. {project_name} checks the query/form parameter against the state cookie to verify that the user makes the call. - ### Limiting Scope - Client Token By default, new client applications have unlimited role scope mappings. Every access token for that client contains all permissions that the user has. If an attacker compromises the client and obtains the client’s access tokens, each system that the user can access is compromised. @@ -137,26 +127,24 @@ Limit the roles of an access token by using the Scope menu for each client. Alte For any clients in CX, the scope is limited to the client scope. - ### Client Policies tbd - ### Limiting User Sessions With the possibility "Limiting User Session" the number of sessions a user can run at once can get limited. When a user reaches the user session limit, they must end their current user sessions before they begin a new session. As part of the reference solution - the limit is not configured - it is up to the respective operator and env. owner to decide if the session limit is used/configured. -If a configuration is planned, the limit needs to get configured as part of the realm authnetication flow setup. +If a configuration is planned, the limit needs to get configured as part of the realm authentication flow setup. ![Tokens](/docs/static/authenticationflow.png) The flow that you must configure depends on how you authenticate users: + - Configure a browser flow if you use local or LDAP/AD authentication - Configure a post-sign in client flow if you use SSO - ## NOTICE This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0).