Skip to content

Commit 41c7b8a

Browse files
committed
Merge #3 Central customization setup
2 parents 7ee6cde + 6bd3890 commit 41c7b8a

File tree

4 files changed

+1410
-198
lines changed

4 files changed

+1410
-198
lines changed

.github/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# MagentaCLOUD user_oidc
2+
3+
Customisation of the Nextcloud delivered OpenID connect app for MagentaCLOUD.
4+
5+
The app extends the standard `user_oidc` Nextcloud app,
6+
see [upstream configuration hints for basic setup](https://github.com/nextcloud/user_oidc/blob/main/README.md)
7+
8+
9+
## Feature: Event-based provisioning (upstream contribution candidate)
10+
The mechanism allows to implement custom puser provisioning logic in a separate Nextcloud app by
11+
registering and handling a attribute change and provisioning event:
12+
13+
```
14+
use OCP\AppFramework\App;
15+
use OCP\AppFramework\Bootstrap\IBootContext;
16+
use OCP\AppFramework\Bootstrap\IBootstrap;
17+
use OCP\AppFramework\Bootstrap\IRegistrationContext;
18+
19+
class Application extends App implements IBootstrap {
20+
...
21+
public function register(IRegistrationContext $context): void {
22+
$context->registerEventListener(AttributeMappedEvent::class, MyUserAttributeListener::class);
23+
$context->registerEventListener(UserAccountChangeEvent::class, MyUserAccountChangeListener::class);
24+
}
25+
...
26+
}
27+
```
28+
The provisioning handler should return a `OCA\UserOIDC\Event\UserAccountChangeResult` object
29+
30+
## Feature: Telekom-specific bearer token
31+
32+
Due to historic reason, Telekom bearer tokens have a close to standard structure, but
33+
require special security implementation in detail. The customisation overrides te standard
34+
35+
36+
### Requiring web-token libraries
37+
The central configuration branch `nmc/2372-central-setup` automatic merge will frequently fail if composer
38+
upstream
39+
40+
The fast and easy way to bring it back to sync with upstream is:
41+
```
42+
git checkout nmc/2372-central-setup
43+
git rebase --onto main nmc/2372-central-setup
44+
# manually take over everything from upstream for composer.lock (TODO: automate that)
45+
46+
# ALWAYS update web-token dependencies in composer.lock
47+
# to avoid upstream conflicts. The lock file diff should only contain adds to upstream state!
48+
composer update "web-token/jwt-*"
49+
```
50+
51+
52+
### Configuring an additional Bearer preshared secret with provider
53+
TODO
54+
55+
### Testing Bearer secrets
56+
TODO

COPYING.DTAG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Although this Nextcloud app code is free and available under the AGPL3 license, Deutsche Telekom
2+
(including T-Systems) fully reserves all rights to the Telekom brand. To prevent users from getting confused about
3+
the source of a digital product or experience, there are stringent restrictions on using the Telekom brand and design,
4+
even when built into code that we provide. For any customization other than explicitly for Telekom or T-Systems, you must
5+
replace the Deutsche Telekom and T-Systems brand elements contained in the provided sources.

composer.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@
2929
]
3030
},
3131
"require": {
32+
"web-token/jwt-core": "^2.0",
33+
"web-token/jwt-encryption": "^2.2",
34+
"web-token/jwt-signature": "^2.2",
35+
"web-token/jwt-encryption-algorithm-aescbc": "^2.2",
36+
"web-token/jwt-encryption-algorithm-ecdh-es": "^2.2",
37+
"web-token/jwt-encryption-algorithm-rsa": "^2.2",
38+
"web-token/jwt-encryption-algorithm-pbes2": "^2.2",
39+
"web-token/jwt-signature-algorithm-hmac": "^2.2",
40+
"web-token/jwt-signature-algorithm-rsa": "^2.2",
41+
"web-token/jwt-util-ecc": "^2.2",
3242
"id4me/id4me-rp": "^1.2",
3343
"firebase/php-jwt": "^5.2",
3444
"bamarni/composer-bin-plugin": "^1.4"

0 commit comments

Comments
 (0)