|
| 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 |
0 commit comments