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
Creates a disabled draft. Success: `201`, `Location` header, `ETag: "1"`, and detail body.
373
375
374
-
### Create Studio Override
376
+
### Create Database Override
375
377
376
378
```http
377
-
POST /external-authentication/connections/{connectionId}/override
379
+
POST /external-authentication/connections
378
380
```
379
381
380
-
Requires create/update authorization and an explicit confirmation payload. The server returns a complete editable copy with `source=studioOverride`; subsequent saves send the whole document. No inherited field markers or partial patch semantics exist. A disabled override continues shadowing. Archiving it reveals configuration; restoring it resumes shadowing in disabled state.
382
+
Requires `external-authentication:connections:create`. Studio starts with a complete editable copy of the configuration-owned connection, preserves its immutable logical `key`, and submits the ordinary create document with `"overridesConfigurationConnection": true`. The server creates a distinct database record with `source=database`; subsequent saves send the whole document to the ordinary update endpoint. No inherited field markers or partial patch semantics exist. A disabled database override continues shadowing the configuration-owned connection. Archiving it reveals configuration; restoring it resumes shadowing in disabled state.
381
383
382
384
### Detail and Update
383
385
@@ -388,15 +390,15 @@ PUT /external-authentication/connections/{connectionId}
388
390
389
391
Read requires `external-authentication:connections:read`; update requires `external-authentication:connections:update` and `If-Match`.
390
392
391
-
Detail includes the create fields plus lifecycle, validation, shadow/conflict diagnostics, effective policy, resolved extension availability, and secret binding state:
393
+
Detail includes the create fields plus lifecycle, validation, shadow/conflict diagnostics, effective policy, resolved extension availability, and secret binding state. `callbackUri` and `previewCallbackUri` are deployment-derived, read-only values that must be registered exactly with strict providers when their respective normal and administrator-preview flows are used:
392
394
393
395
```json
394
396
{
395
397
"secretBindings": {
396
398
"clientSecret": {
397
-
"resolverType": "elsa-secrets",
398
399
"ownership": "managed",
399
-
"reference": "contoso-oidc-secret",
400
+
"resolverType": null,
401
+
"reference": null,
400
402
"isConfigured": true,
401
403
"isResolvable": true
402
404
}
@@ -423,42 +425,43 @@ For an OpenID Connect connection, `adapterSettings` MAY include explicit overrid
423
425
}
424
426
```
425
427
426
-
The safe default is to omit `advancedTrustOverrides` and use the exact `discoveryUrl`. Creating or updating a connection with any advanced trust override requires both the normal create/update permission and `external-authentication:provider-trust:unsafe`; deployment policy must also allow the operation. The command MUST include the non-persisted field `"confirmUnsafeProviderTrust": true`; omission or `false` is rejected. Acceptance emits a security notification containing the connection identity, changed field names, actor, and revision, but not signing-key bodies or secret material. Authorized detail responses return the configured override values and identify that Advanced trust is active so Studio can keep its warning visible; `confirmUnsafeProviderTrust` is never returned or persisted.
428
+
The safe default is to omit `advancedTrustOverrides` and use the exact `discoveryUrl`. Creating or updating a connection with any advanced trust override requires both the normal create/update permission and `external-authentication:provider-trust:unsafe`; deployment policy must also allow the operation. The command MUST include the non-persisted field `"confirmUnsafeSettings": true`; omission or `false` is rejected. Acceptance emits a security notification containing the connection identity, changed field names, actor, and revision, but not signing-key bodies or secret material. Authorized detail responses return the configured override values and identify that Advanced trust is active so Studio can keep its warning visible; `confirmUnsafeSettings` is never returned or persisted.
427
429
428
430
These fields replace only the corresponding discovery-derived inputs. They cannot change Elsa-owned callback routing, confidential-client requirements, mandatory S256 PKCE, or state, correlation, nonce, signature, issuer, audience/authorized-party, expiry, and callback-error validation.
429
431
430
432
### Secret Binding Replacement/Removal
431
433
432
434
```http
433
-
PUT /external-authentication/connections/{connectionId}/secret-bindings/{fieldName}
435
+
PUT /external-authentication/connections/{connectionId}/secret-bindings/{fieldName}/managed
Requires `external-authentication:connections:update` and `If-Match`.
438
440
439
441
```json
440
442
{
441
-
"ownership": "managed",
442
443
"resolverType": "elsa-secrets",
443
-
"reference": "contoso-oidc-secret",
444
-
"expectedType": "text",
445
-
"expectedScope": "external-authentication"
444
+
"value": "write-only-secret-value"
446
445
}
447
446
```
448
447
449
-
If the Elsa Secrets bridge supports inline creation/replacement, its secret value is submitted to the Secrets API, not returned or embedded in the connection response. External bindings use `ownership=external` and a deployment resolver such as `configuration`; their value cannot be replaced or removed through these endpoints.
448
+
The managed writer stages a new secret reference, publishes it only if the connection revision compare-and-swap succeeds, and removes staged material after any definitive failure. If a store failure has an ambiguous commit outcome and the persisted binding cannot be verified, Elsa retains the staged material rather than risk deleting a live secret and records an operational warning. Neither the value nor the managed reference is returned. General create/update connection documents cannot supply secret bindings.
449
+
450
+
External bindings use `ownership=external` and a deployment resolver such as `configuration`. They are deployment-owned, may be declared only by configuration connections, and cannot be created, replaced, or removed through management endpoints.
450
451
451
452
### Lifecycle Actions
452
453
453
454
```http
454
455
POST /external-authentication/connections/{connectionId}/enable
455
-
POST /external-authentication/connections/{connectionId}/disable?confirmFinalLoginPathOverride=false
456
+
POST /external-authentication/connections/{connectionId}/disable?confirmFinalLoginPathOverride=false&revokeActiveSessions=false
POST /external-authentication/connections/{connectionId}/restore
458
459
```
459
460
460
461
All require `If-Match`.
461
462
463
+
`revokeActiveSessions=true` additionally requires `external-authentication:sessions:revoke` and emits an aggregate, redacted session-revocation security notification.
464
+
462
465
Disabling or archiving the final normal login method is rejected with `409 conflict` and `details.code` set to `final_login_path_guard` unless another normal/local method or deployment-owned break-glass method remains. A caller holding the deployment-configured privileged override permission may repeat the operation with `confirmFinalLoginPathOverride=true`; Studio requires a separate explicit recovery confirmation before sending it.
463
466
464
467
| Action | Permission |
@@ -514,6 +517,8 @@ Requires `external-authentication:connections:preview`. POST requires `If-Match`
514
517
515
518
The authorize route consumes the administrator-bound start state and redirects to the provider. The provider callback stores only a redacted result and returns safe completion status. Result GET is one-time, bound to the initiating administrator session, and returns the allowlisted Preview Result. It returns `410` after expiry/consumption and never produces a normal completion code.
516
519
520
+
The provider registration must include the exact read-only `previewCallbackUri` returned on the connection resource. This is distinct from the normal `callbackUri` because preview completion is isolated from user sign-in and cannot create a user, link, credential, or session.
EF persistence also stores the normalized `ExpiresAtUtcTicks` companion used in the same compare-and-swap predicate as `ConsumedAt`, because not every supported provider can order `DateTimeOffset` values directly.
188
+
187
189
The public handle contains no protected payload. Atomic take transitions pending to consumed; expired or mismatched state is never revived.
Register that exact callback with the provider. The callback, confidential-client requirement, S256 PKCE, and validation steps are immutable. Discovery-derived issuer, authorization/token endpoints, and signing keys appear only under **Advanced** when deployment policy enables unsafe provider trust and the caller has the dedicated permission; saving them requires explicit confirmation and leaves a persistent warning. The configuration-first example intentionally uses discovery without overrides.
183
+
Register both exact callbacks with the provider when administrators will use Preview. The first handles normal user sign-in and is keyed by the immutable logical Connection Key; the second handles administrator previews and is keyed by the stable connection record ID. Both are shown read-only in management responses and Studio. The callbacks, confidential-client requirement, S256 PKCE, and validation steps are immutable. Discovery-derived issuer, authorization/token endpoints, and signing keys appear only under **Advanced** when deployment policy enables unsafe provider trust and the caller has the dedicated permission; saving them requires explicit confirmation and leaves a persistent warning. The configuration-first example intentionally uses discovery without overrides.
179
184
180
185
The role IDs in `defaultRoleIds` must exist, and the actor applying persisted equivalents must be authorized to assign them. They apply only when `create-user` creates a new user. The optional matcher-based policy selects one deployed `IExternalUserMatcher`; v1 ships no Elsa verified-email matcher, and matchers never select roles or permissions.
Copy file name to clipboardExpand all lines: src/clients/Elsa.Api.Client/Resources/ExternalAuthentication/Connections/Contracts/IExternalAuthenticationConnectionsApi.cs
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -26,19 +26,37 @@ public interface IExternalAuthenticationConnectionsApi
Copy file name to clipboardExpand all lines: src/clients/Elsa.Api.Client/Resources/ExternalAuthentication/Connections/Models/ExternalAuthenticationConnection.cs
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ public sealed class ExternalAuthenticationConnection
0 commit comments