Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a6cfd4d

Browse files
committedSep 27, 2024·
Updated corresponding PR review
1 parent cd5a856 commit a6cfd4d

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed
 

‎java/operating-applications/dashboard.md

+30-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
synopsis: >
33
This section describes how the CAP Developer Dashboard can be set up in both the local and cloud development environment to improve the developer experience.
44
status: released
5-
redirect_from: java/observability
65
---
76

87
# Developer Dashboard
@@ -24,6 +23,8 @@ The dashboard is only intended for use in the development environment. It is str
2423

2524
The CAP Developer Dashboard simplifies development by providing a centralized point where developers can efficiently manage and monitor their CAP applications. It offers tools and functions to support the development process and helps developers to quickly identify and resolve problems. Additionally, the dashboard facilitates better integration of CAP components, such as messaging, resilience and multitenancy, ensuring seamless functionality throughout CAP applications.
2625

26+
You can get a brief overview of the dashboard's features in the [Developer Dashboard Presentation](https://broadcast.sap.com/replay/240604_recap?playhead=2188) at our RECAP 2024 conference.
27+
2728
Add the `cds-feature-dev-dashboard` feature to your maven dependencies:
2829

2930
```xml [pom.xml]
@@ -54,25 +55,35 @@ cds:
5455
5556
If you also want to use the CAP Developer Dashboard in your cloud development scenario, you need to take a few more steps to achieve this. Let's take an example of a BTP Cloud Foundry app example with Approuter and XSUAA.
5657
57-
First you must deactivate the [production profile](https://pages.github.tools.sap/cap/docs/java/developing-applications/configuring#production-profile). To do this, set the property `cds.environment.production.enabled` in `application.yaml` or `CDS_ENVIRONMENT_PRODUCTION_ENABLED` in `mta.yaml` to `false`.
58+
- First you must deactivate the [production profile](https://pages.github.tools.sap/cap/docs/java/developing-applications/configuring#production-profile). To do this, set the property `cds.environment.production.enabled` in **application.yaml** or `CDS_ENVIRONMENT_PRODUCTION_ENABLED` in **mta.yaml** to `false`.
59+
60+
- Second, you need to add the `cds.Developer` role to your security configuration (**xs-security.json** is an example of the XSUAA configuration).
5861

59-
Second, you need to add the `cds.Developer` role to your security configuration. Here is an example of the XSUAA configuration:
62+
- And finally, you need to customize the approuter configuration (**xs-app.json**) by enabling support for websocket connections and defining the dashboard routes.
6063

6164
::: code-group
65+
```yaml [mta.yaml]
66+
modules:
67+
- name: my-cap-app-srv
68+
[...]
69+
properties:
70+
CDS_ENVIRONMENT_PRODUCTION_ENABLED: false
71+
```
72+
6273
```json [xs-security.json]
6374
{
6475
"xsappname": "dashboard-test",
65-
...
76+
[...]
6677
"scopes": [
6778
{
6879
"name": "$XSAPPNAME.cds.Developer",
6980
"description": "CAP Developer"
7081
},
71-
...
82+
[...]
7283
],
7384
"attributes": [
7485
{
75-
...
86+
[...]
7687
}
7788
],
7889
"role-templates": [
@@ -83,15 +94,11 @@ Second, you need to add the `cds.Developer` role to your security configuration.
8394
"$XSAPPNAME.cds.Developer"
8495
]
8596
},
86-
...
97+
[...]
8798
]
8899
}
89100
```
90-
:::
91101

92-
Finally, you need to customize the approuter configuration by enabling support for websocket connections and defining the dashboard routes:
93-
94-
::: code-group
95102
```json [xs-app.json]
96103
{
97104
...
@@ -115,7 +122,7 @@ Finally, you need to customize the approuter configuration by enabling support f
115122
"authenticationType": "xsuaa",
116123
"destination": "backend"
117124
},
118-
...
125+
[...]
119126
]
120127
}
121128
```
@@ -127,9 +134,9 @@ Now you can deploy the application in BTP and assign the `cds.Developer` role to
127134
For security reasons, the **cds.Developer** role should only be used in conjunction with test users. It is strongly recommended not to use this role with users who could potentially be used in production systems.
128135
:::
129136

130-
## Unauthorized Access
137+
## Disable Authorization
131138

132-
In some cases, your application may run in a complex environment such as DwC and you simply want to access the CAP Developer Dashboard running in your CAP Service Module directly without using a router in between. For this reason, you can switch off the authorization to grant direct unauthorized access.
139+
In some cases, your application may run in a complex environment such as DwC and you simply want to access the CAP Developer Dashboard running in your CAP Service Module directly without using a router in between. For this reason, you can switch off the authorization to grant direct unauthorized access (either via the static configuration **application.yaml** or in the deployment configuration **mta.yaml**).
133140

134141
::: code-group
135142
```yaml [application.yaml]
@@ -138,6 +145,15 @@ cds:
138145
authorization:
139146
enabled: false
140147
```
148+
149+
```yaml [mta.yaml]
150+
modules:
151+
- name: my-cap-app-srv
152+
[...]
153+
properties:
154+
CDS_DASHBOARD_AUTHORIZATION_ENABLED: false
155+
```
156+
141157
:::
142158

143159
To open finally the endpoint, authentication can be disabled via the spring web security configuration. Alternatively, the DwC web security configuration is provided to disable mTLS for the CAP Developer Dashboard endpoint.

0 commit comments

Comments
 (0)
Please sign in to comment.