Skip to content

Commit 9601724

Browse files
authored
change default service user role to internal-user (#91)
* change default service user role to internal-user * update links * update CHANGELOG.md * wording
1 parent 55a8dcd commit 9601724

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
## v1.2.4 - tbd
1111

12+
### Changed
13+
14+
- cds-plugin: change default service access role to `internal-user` (fixes #90).
15+
1216
## v1.2.3 - 2025-02-05
1317

1418
### Added

docs/plugin/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ all of them the same unique name. See
3737

3838
_serviceAccessRoles_, _readAccessRoles_, _writeAccessRoles_, _adminAccessRoles_<br>
3939
By default the `FeatureService` read and write endpoints are accessible only to users with the CAP pseudo-role
40-
[system-user](https://cap.cloud.sap/docs/guides/authorization#pseudo-roles). Different projects have their own access role preferences, so this setting allows them to set a
41-
list of strings, which represent the roles required to access the service. For details see [@requires](https://cap.cloud.sap/docs/guides/authorization#requires).
40+
[internal-user](https://cap.cloud.sap/docs/guides/security/authorization#pseudo-roles). Different projects have their own access role preferences, so this setting allows them to set a
41+
list of strings, which represent the roles required to access the service. For details see [@requires](https://cap.cloud.sap/docs/guides/security/authorization#requires).
4242

4343
It will usually be sufficient to set the `serviceAccessRoles` configuration, which covers both the read and write
4444
endpoints, but not the admin endpoints. If more discriminating access control is required, the `readAccessRoles` and

example-cap-server/.cdsrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"system": {
77
"tenant": "system",
88
"password": "system",
9-
"id": "system-user",
10-
"roles": ["system-user"]
9+
"roles": ["internal-user"]
1110
},
1211
"alice": {
1312
"tenant": "people",

example-cap-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"featureToggles": {
3232
"configFile": "./srv/feature/toggles.yaml",
3333
"serviceAccessRoles": [
34-
"system-user",
34+
"internal-user",
3535
"custom-role"
3636
]
3737
}

src/service/feature-service.cds

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
@impl: '@cap-js-community/feature-toggle-library/src/service/feature-service.js'
44
service FeatureService {
5-
@(requires: ['system-user'])
5+
@(requires: ['internal-user'])
66
function state() returns {};
7-
@(requires: ['system-user'])
7+
@(requires: ['internal-user'])
88
action redisRead() returns {};
99

1010
// NOTE: expects an object as input
11-
@(requires: ['system-user'])
11+
@(requires: ['internal-user'])
1212
@open
1313
action redisUpdate(newValues: {});
1414

test/cds-test-project/.cdsrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"system": {
77
"tenant": "system",
88
"password": "system",
9-
"id": "system-user",
10-
"roles": ["system-user"]
9+
"roles": ["internal-user"]
1110
}
1211
}
1312
}

0 commit comments

Comments
 (0)