Skip to content

Commit 8034555

Browse files
committed
AI-supported review
1 parent 766a6cb commit 8034555

File tree

4 files changed

+81
-83
lines changed

4 files changed

+81
-83
lines changed

guides/security/authentication.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ Mock users are deactivated in production profile by default ❗
159159

160160
### Preconfigured Mock Users { #preconfigured-mock-users }
161161

162-
For convenience, the runtime creates default mock users to cover typical test scenarios, e.g. privileged users passing all security checks or users which pass authentication but do not have additional claims.
163-
The predefined users are added to [custom mock users](#custom-mock-users) defined by the application.
162+
For convenience, the runtime creates default mock users to cover typical test scenarios, such as privileged users passing all security checks or users that pass authentication but don't have additional claims.
163+
The runtime adds the predefined users to [custom mock users](#custom-mock-users) you define in the application.
164164

165165
You can opt out the preconfigured mock users by setting <Config java>`cds.security.mock.defaultUsers = false`</Config>. { .java }
166166

@@ -309,7 +309,7 @@ Integration tests running in production profile should verify that unauthenticat
309309
- cross-landscape user propagation (including on-premise)
310310
- streamlined SAP and non-SAP system [integration](https://help.sap.com/docs/cloud-identity-services/cloud-identity-services/integrating-service) (due to [OpenId Connect](https://openid.net/connect/) compliance)
311311
312-
IAS authentication is best configured and tested in the Cloud, so let's enhance the [previously started bookshop sample application](#mock-user-authentication) with a deployment descriptor for SAP BTP, Cloud Foundry Runtime (CF).
312+
You can best configure and test IAS authentication in the Cloud, so let's enhance the [previously started bookshop sample application](#mock-user-authentication) with a deployment descriptor for SAP BTP, Cloud Foundry Runtime (CF).
313313
314314
315315
### Get Ready with IAS { #ias-ready }
@@ -466,10 +466,10 @@ In the [Administrative Console for Cloud Identity Services](https://help.sap.com
466466
you can see and manage the deployed IAS application. You need a user with administrative privileges in the IAS tenant to access the services at `<ias-tenant>.accounts400.ondemand.com/admin`.
467467
468468
In the Console you can manage the IAS tenant and IAS applications, for example:
469-
- Create (test) users in `Users & Authorizations` -> `User Management`
470-
- Deactivate users
471-
- Configure the authentication strategy (password policies, MFA etc.) in `Applications & Resources` -> `Applications` (IAS instances listed with their display-name)
472-
- Inspect logs in `Monitoring & Reporting` -> `Troubleshooting`
469+
- Create (test) users in `Users & Authorizations` -> `User Management`.
470+
- Deactivate users.
471+
- Configure the authentication strategy (password policies, multifactor authentication, and similar) in `Applications & Resources` -> `Applications` (IAS instances listed with their display-name).
472+
- Inspect logs in `Monitoring & Reporting` -> `Troubleshooting`.
473473
474474
::: tip
475475
In BTP Cockpit, service instance `bookshop-ias` appears as a link that allows direct navigation to the IAS application in the Administrative Console for IAS.
@@ -510,7 +510,7 @@ The overall setup with CLI client and the Cloud services is sketched in the diag
510510
![CLI-level Testing of IAS Endpoints](./assets/ias-cli-setup.drawio.svg){width="500px"}
511511
512512
As IAS requires mTLS-protected channels, **client certificates are mandatory** for all of the following requests:
513-
- Token request to IAS in order to fetch a valid IAS token (1)
513+
- Token request to IAS to fetch a valid IAS token (1)
514514
- Business request to the CAP application presenting the token (2)
515515
- Initial proof token request to IAS - not required for all business requests (3)
516516
@@ -625,8 +625,8 @@ cf delete-service-key bookshop-ias bookshop-ias-key
625625
626626
### UI Level Testing
627627
628-
In the UI scenario, adding an Application Router as an ingress proxy to the deployment simplifies testing a lot.
629-
It will take care of fetching the required IAS tokens when forwarding requests to the backend service.
628+
In the UI scenario, adding an Application Router as an ingress proxy to the deployment simplifies testing significantly.
629+
It fetches the required IAS tokens when forwarding requests to the backend service.
630630
631631
Enhancing the project with [SAP Cloud Portal](../deploy/to-cf#option-a-sap-cloud-portal) configuration adds an Application Router component as well as HTML5 Application Repository:
632632
@@ -662,7 +662,7 @@ In addition, property `forwardAuthCertificates` needs to be `true` to support th
662662
:::
663663
664664
As the login flow is based on an HTTP redirect between the CAP application and IAS login page,
665-
IAS needs to know a valid callback URI which is offered by the AppRouter out-of-the-box.
665+
IAS needs to know a valid callback URI that the AppRouter offers out of the box.
666666
The same is true for the logout flow.
667667
668668
::: details Redirect URIs for login and logout
@@ -704,7 +704,7 @@ The Application Router should redirect to a login flow where you can enter the c
704704
In contrast to [IAS](#ias-auth), XSUAA does not allow cross-landscape user propagation out of the box.
705705
:::
706706
707-
XSUAA authentication is best configured and tested in the Cloud, so let's enhance the sample with a deployment descriptor for SAP BTP, Cloud Foundry Runtime (CF).
707+
You can best configure and test XSUAA authentication in the Cloud, so let's enhance the sample with a deployment descriptor for SAP BTP, Cloud Foundry Runtime (CF).
708708
709709
710710
### Get Ready with XSUAA { #xsuaa-ready }
@@ -731,7 +731,7 @@ cds add hana
731731
```
732732
733733
::: tip For Java
734-
Command `add mta` will enhance the project with `cds-starter-cloudfoundry` and therefore all [dependencies required for security](../../java/security#maven-dependencies) are added transitively.
734+
Command `add mta` enhances the project with `cds-starter-cloudfoundry` and therefore adds all [dependencies required for security](../../java/security#maven-dependencies) transitively.
735735
736736
:::
737737
@@ -811,7 +811,7 @@ There are some mandatory configuration parameters:
811811
812812
::: warning
813813
Upgrading the `service-plan` from type `application` to `broker` is not supported.
814-
Hence, start with plan `broker` in case you want to provide technical APIs in future.
814+
Start with plan `broker` if you want to provide technical APIs in future.
815815
:::
816816
817817
[Learn more about XSUAA application security descriptor configuration syntax](https://help.sap.com/docs/btp/sap-business-technology-platform/application-security-descriptor-configuration-syntax){.learn-more}
@@ -855,9 +855,9 @@ For convenience, when adding the XSUAA facet, these artifacts are initially deri
855855
856856
At runtime, after successful authentication, the scope prefix `$XSAPPNAME`is removed by the CAP integration to match the corresponding CAP role.
857857
858-
In the [deplyoment descriptor](#adding-xsuaa), the optional property `role-collections` contains a list of preconfigured role collections.
859-
In general, role collections are [created manually](./cap-users#xsuaa-assign) at runtime by user administrators.
860-
But in case the underlying role template has no reference to an attribute, a corresponding role collection can be prepared already for sake of convenience.
858+
In the [deployment descriptor](#adding-xsuaa), the optional property `role-collections` contains a list of preconfigured role collections.
859+
In general, user administrators [create role collections manually](./cap-users#xsuaa-assign) at runtime.
860+
However, if the underlying role template has no reference to an attribute, you can prepare a corresponding role collection for convenience.
861861
862862
In the example, role collection `admin (bookshop <org>-<space>)` containing the role template `admin` is defined and can be directly assigned to users.
863863
@@ -1017,7 +1017,7 @@ The request returns with a valid XSUAA token which is suitable to pass authentic
10171017
{"access_token":"<the token>", "token_type":"bearer","expires_in":43199, [...]}
10181018
```
10191019
1020-
With the token for the technical user, you should be able to access endpoints, which has no specific role requirements:
1020+
With the token for the technical user, you should be able to access endpoints that have no specific role requirements:
10211021
10221022
<div class="java">
10231023
@@ -1039,8 +1039,8 @@ curl -H "Authorization: Bearer <access_token>" \
10391039
10401040
</div>
10411041
1042-
If you also want to access the `AdminService` which requires the role `admin`,
1043-
you need to fetch the token for the named user instead. That is the user which you have assigned the `admin (bookshop <org>-<space>)` role collection to.
1042+
If you also want to access the `AdminService` that requires the role `admin`,
1043+
you need to fetch the token for the named user instead. That is the user to whom you assigned the `admin (bookshop <org>-<space>)` role collection.
10441044
10451045
With the token for the named user, the following request should succeed:
10461046
@@ -1081,8 +1081,8 @@ cf delete-service-key bookshop-auth bookshop-auth-key
10811081
10821082
### UI Level Testing
10831083
1084-
In the UI scenario, adding an Application Router as an ingress proxy to the deployment simplifies testing a lot.
1085-
It will take care of fetching the required XSUAA tokens when forwarding requests to the backend service.
1084+
In the UI scenario, adding an Application Router as an ingress proxy to the deployment simplifies testing significantly.
1085+
It fetches the required XSUAA tokens when forwarding requests to the backend service.
10861086
10871087
Enhancing the project with [SAP Cloud Portal](../deploy/to-cf#option-a-sap-cloud-portal) configuration adds an Application Router component as well as HTML5 Application Repository:
10881088
@@ -1121,7 +1121,7 @@ modules:
11211121
:::
11221122
11231123
As the login flow is based on an HTTP redirect between the CAP application and XSUAA login page,
1124-
XSUAA needs to know a valid callback URI which is offered by the Application Router out of the box.
1124+
XSUAA needs to know a valid callback URI that the Application Router offers out of the box.
11251125
The same is true for the logout flow.
11261126
11271127
::: details Redirect URIs for login and logout
@@ -1170,9 +1170,9 @@ will come soon
11701170
<div class="java">
11711171
11721172
There are multiple reasons why customization might be required:
1173-
1. Endpoints for non-business requests often require specific authentication methods (e.g. health check, technical services).
1174-
2. The application is deployed in the context of a service mesh with ingress authentication (e.g. Istio).
1175-
3. The application needs to integrate with a 3rd party authentication service.
1173+
1. Endpoints for non-business requests often require specific authentication methods (for example, health check, technical services).
1174+
2. The application is deployed in the context of a service mesh with ingress authentication (for example, Istio).
1175+
3. The application needs to integrate with a third-party authentication service.
11761176
11771177
![Endpoints with different authentication strategy](./assets/custom-auth.drawio.svg){width="380px"}
11781178
@@ -1181,9 +1181,9 @@ There are multiple reasons why customization might be required:
11811181
11821182
11831183
- For CAP endpoints you are fine to go with the [automatic authentication](#model-auth) fully derived from the CAP model.
1184-
- For custom endpoints that should be protected by the same authentication strategy you are also fine with automatc authentication as CAP will cover these endpoints by default.
1185-
- For custom endpoints that should have a different kind of authentication strategy (e.g. X.509, basic or none) you can add a security configuration that [partially overrules](#partially-auth) the CAP integration partially for exactly these endpoints.
1186-
- In case the authentiaction is delegated to a different component, just [fully overrule](#fully-auth) CAP authentication and replace by any suitable strategy.
1184+
- For custom endpoints that should be protected by the same authentication strategy you are also fine with automatic authentication as CAP will cover these endpoints by default.
1185+
- For custom endpoints that should have a different kind of authentication strategy (for example, X.509, basic or none) you can add a security configuration that [partially overrules](#partially-auth) the CAP integration for exactly these endpoints.
1186+
- If the authentication is delegated to a different component, just [fully overrule](#fully-auth) CAP authentication and replace it with any suitable strategy.
11871187
11881188
::: tip Secure by Default
11891189
**By default, CAP authenticates all endpoints of the microservice, including the endpoints which are not served by CAP itself**.
@@ -1352,7 +1352,7 @@ TODO
13521352
Endpoints of (CAP) applications deployed on SAP BTP are, by default, accessible from the public network.
13531353
Without security middleware configured, CDS services are exposed to the public.
13541354
1355-
- **Don't rely on Application Router authentication**. Application Router as a frontend proxy does not shield the backend from incoming traffic. Therefore, the backend must be secured independently.
1355+
- **Don't rely on Application Router authentication**. Application Router as a frontend proxy does not shield the backend from incoming traffic. Therefore, you must secure the backend independently.
13561356
13571357
- **Don't deviate from security defaults**. Only when absolutely necessary should experts make the decision to add modifications or replace parts of the standard authentication mechanisms.
13581358

0 commit comments

Comments
 (0)