You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: java/operating-applications/dashboard.md
+30-14
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
synopsis: >
3
3
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.
4
4
status: released
5
-
redirect_from: java/observability
6
5
---
7
6
8
7
# Developer Dashboard
@@ -24,6 +23,8 @@ The dashboard is only intended for use in the development environment. It is str
24
23
25
24
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.
26
25
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
+
27
28
Add the `cds-feature-dev-dashboard` feature to your maven dependencies:
28
29
29
30
```xml [pom.xml]
@@ -54,25 +55,35 @@ cds:
54
55
55
56
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.
56
57
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).
58
61
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.
60
63
61
64
::: 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
+
62
73
```json [xs-security.json]
63
74
{
64
75
"xsappname": "dashboard-test",
65
-
...
76
+
[...]
66
77
"scopes": [
67
78
{
68
79
"name": "$XSAPPNAME.cds.Developer",
69
80
"description": "CAP Developer"
70
81
},
71
-
...
82
+
[...]
72
83
],
73
84
"attributes": [
74
85
{
75
-
...
86
+
[...]
76
87
}
77
88
],
78
89
"role-templates": [
@@ -83,15 +94,11 @@ Second, you need to add the `cds.Developer` role to your security configuration.
83
94
"$XSAPPNAME.cds.Developer"
84
95
]
85
96
},
86
-
...
97
+
[...]
87
98
]
88
99
}
89
100
```
90
-
:::
91
101
92
-
Finally, you need to customize the approuter configuration by enabling support for websocket connections and defining the dashboard routes:
93
-
94
-
::: code-group
95
102
```json [xs-app.json]
96
103
{
97
104
...
@@ -115,7 +122,7 @@ Finally, you need to customize the approuter configuration by enabling support f
115
122
"authenticationType": "xsuaa",
116
123
"destination": "backend"
117
124
},
118
-
...
125
+
[...]
119
126
]
120
127
}
121
128
```
@@ -127,9 +134,9 @@ Now you can deploy the application in BTP and assign the `cds.Developer` role to
127
134
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.
128
135
:::
129
136
130
-
## Unauthorized Access
137
+
## Disable Authorization
131
138
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**).
133
140
134
141
::: code-group
135
142
```yaml [application.yaml]
@@ -138,6 +145,15 @@ cds:
138
145
authorization:
139
146
enabled: false
140
147
```
148
+
149
+
```yaml [mta.yaml]
150
+
modules:
151
+
- name: my-cap-app-srv
152
+
[...]
153
+
properties:
154
+
CDS_DASHBOARD_AUTHORIZATION_ENABLED: false
155
+
```
156
+
141
157
:::
142
158
143
159
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