diff --git a/about/features.md b/about/features.md index fb0f76820c..e9b320bb16 100644 --- a/about/features.md +++ b/about/features.md @@ -115,7 +115,7 @@ Following is an index of the features currently covered by CAP, with status and | [Streaming & Media Types](../guides/providing-services#serving-media-data) | | | | | [Conflict Detection through _ETags_](../guides/providing-services#etag) | | | | | [Authentication via JWT](../guides/security/authorization#prerequisite-authentication) | | | | -| [Basic Authentication](../guides/security/authorization#prerequisite-authentication) | | | | +| [Mocked Authentication](../guides/security/authorization#prerequisite-authentication) | | | |
diff --git a/node.js/authentication.md b/node.js/authentication.md index 99e253f179..338219f766 100644 --- a/node.js/authentication.md +++ b/node.js/authentication.md @@ -188,6 +188,9 @@ This strategy creates a user that passes all authorization checks. It's meant fo This authentication strategy uses basic authentication with pre-defined mock users during development. +::: warning Mocked authentication is not suitable for production! +::: + > **Note:** When testing different users in the browser, it's best to use an incognito window, because logon information might otherwise be reused. **Configuration:** Choose this strategy as follows: @@ -254,48 +257,10 @@ If you want to restrict these additional logins, you need to overwrite the defau } ``` - -### Basic Authentication {#basic } - -This authentication strategy uses basic authentication to use mock users during development. - -> **Note:** When testing different users in the browser, it's best to use an incognito window, because logon information might otherwise be reused. - -**Configuration:** Choose this strategy as follows: - -::: code-group -```json [package.json] -"cds": { - "requires": { - "auth": "basic" - } -} -``` +::: tip +The pre-defined mock users can be deactivated by using kind `basic` instead of `mocked`. In that case configure users yourself, as described previously. ::: -You can optionally configure users as follows: - -::: code-group -```json [package.json] -"cds": { - "requires": { - "auth": { - "kind": "basic", - "users": { - "": { - "password": "", - "roles": [ "", ... ], - "attr": { ... } - } - } - } - } -} -``` -::: - -In contrast to [mocked authentication](#mocked), no default users are automatically added to the configuration. - ### JWT-based Authentication { #jwt }