mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
[PM-5149] UI for unique SP entity id on organization sso configs (#7117)
* add ui for making sp entity id unique * pretty * updates
This commit is contained in:
parent
c481d92948
commit
06c7c3fd18
@ -5176,6 +5176,12 @@
|
|||||||
"spValidateCertificates": {
|
"spValidateCertificates": {
|
||||||
"message": "Validate certificates"
|
"message": "Validate certificates"
|
||||||
},
|
},
|
||||||
|
"spUniqueEntityId": {
|
||||||
|
"message": "Set a unique SP entity ID"
|
||||||
|
},
|
||||||
|
"spUniqueEntityIdDesc": {
|
||||||
|
"message": "Generate an identifier that is unique to your organization"
|
||||||
|
},
|
||||||
"idpEntityId": {
|
"idpEntityId": {
|
||||||
"message": "Entity ID"
|
"message": "Entity ID"
|
||||||
},
|
},
|
||||||
|
@ -307,7 +307,18 @@
|
|||||||
<div class="config-section">
|
<div class="config-section">
|
||||||
<h2 class="secondary-header">{{ "samlSpConfig" | i18n }}</h2>
|
<h2 class="secondary-header">{{ "samlSpConfig" | i18n }}</h2>
|
||||||
|
|
||||||
<bit-form-field>
|
<bit-form-control>
|
||||||
|
<bit-label>{{ "spUniqueEntityId" | i18n }}</bit-label>
|
||||||
|
<input
|
||||||
|
bitCheckbox
|
||||||
|
type="checkbox"
|
||||||
|
formControlName="spUniqueEntityId"
|
||||||
|
id="spUniqueEntityId"
|
||||||
|
/>
|
||||||
|
<bit-hint>{{ "spUniqueEntityIdDesc" | i18n }}</bit-hint>
|
||||||
|
</bit-form-control>
|
||||||
|
|
||||||
|
<bit-form-field *ngIf="ssoConfigForm.value.saml.spUniqueEntityId">
|
||||||
<bit-label>{{ "spEntityId" | i18n }}</bit-label>
|
<bit-label>{{ "spEntityId" | i18n }}</bit-label>
|
||||||
<input bitInput disabled [value]="spEntityId" />
|
<input bitInput disabled [value]="spEntityId" />
|
||||||
<button
|
<button
|
||||||
@ -319,6 +330,18 @@
|
|||||||
></button>
|
></button>
|
||||||
</bit-form-field>
|
</bit-form-field>
|
||||||
|
|
||||||
|
<bit-form-field *ngIf="!ssoConfigForm.value.saml.spUniqueEntityId">
|
||||||
|
<bit-label>{{ "spEntityId" | i18n }}</bit-label>
|
||||||
|
<input bitInput disabled [value]="spEntityIdStatic" />
|
||||||
|
<button
|
||||||
|
bitIconButton="bwi-clone"
|
||||||
|
bitSuffix
|
||||||
|
type="button"
|
||||||
|
[appCopyClick]="spEntityIdStatic"
|
||||||
|
[appA11yTitle]="'copyValue' | i18n"
|
||||||
|
></button>
|
||||||
|
</bit-form-field>
|
||||||
|
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
<bit-label>{{ "spMetadataUrl" | i18n }}</bit-label>
|
<bit-label>{{ "spMetadataUrl" | i18n }}</bit-label>
|
||||||
<input bitInput disabled [value]="spMetadataUrl" />
|
<input bitInput disabled [value]="spMetadataUrl" />
|
||||||
|
@ -104,6 +104,7 @@ export class SsoComponent implements OnInit, OnDestroy {
|
|||||||
callbackPath: string;
|
callbackPath: string;
|
||||||
signedOutCallbackPath: string;
|
signedOutCallbackPath: string;
|
||||||
spEntityId: string;
|
spEntityId: string;
|
||||||
|
spEntityIdStatic: string;
|
||||||
spMetadataUrl: string;
|
spMetadataUrl: string;
|
||||||
spAcsUrl: string;
|
spAcsUrl: string;
|
||||||
|
|
||||||
@ -132,6 +133,7 @@ export class SsoComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
protected samlForm = this.formBuilder.group<ControlsOf<SsoConfigView["saml"]>>(
|
protected samlForm = this.formBuilder.group<ControlsOf<SsoConfigView["saml"]>>(
|
||||||
{
|
{
|
||||||
|
spUniqueEntityId: new FormControl(true, { updateOn: "change" }),
|
||||||
spNameIdFormat: new FormControl(Saml2NameIdFormat.NotConfigured),
|
spNameIdFormat: new FormControl(Saml2NameIdFormat.NotConfigured),
|
||||||
spOutboundSigningAlgorithm: new FormControl(defaultSigningAlgorithm),
|
spOutboundSigningAlgorithm: new FormControl(defaultSigningAlgorithm),
|
||||||
spSigningBehavior: new FormControl(Saml2SigningBehavior.IfIdpWantAuthnRequestsSigned),
|
spSigningBehavior: new FormControl(Saml2SigningBehavior.IfIdpWantAuthnRequestsSigned),
|
||||||
@ -250,6 +252,7 @@ export class SsoComponent implements OnInit, OnDestroy {
|
|||||||
this.callbackPath = ssoSettings.urls.callbackPath;
|
this.callbackPath = ssoSettings.urls.callbackPath;
|
||||||
this.signedOutCallbackPath = ssoSettings.urls.signedOutCallbackPath;
|
this.signedOutCallbackPath = ssoSettings.urls.signedOutCallbackPath;
|
||||||
this.spEntityId = ssoSettings.urls.spEntityId;
|
this.spEntityId = ssoSettings.urls.spEntityId;
|
||||||
|
this.spEntityIdStatic = ssoSettings.urls.spEntityIdStatic;
|
||||||
this.spMetadataUrl = ssoSettings.urls.spMetadataUrl;
|
this.spMetadataUrl = ssoSettings.urls.spMetadataUrl;
|
||||||
this.spAcsUrl = ssoSettings.urls.spAcsUrl;
|
this.spAcsUrl = ssoSettings.urls.spAcsUrl;
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ export class SsoConfigApi extends BaseResponse {
|
|||||||
api.acrValues = view.openId.acrValues;
|
api.acrValues = view.openId.acrValues;
|
||||||
api.expectedReturnAcrValue = view.openId.expectedReturnAcrValue;
|
api.expectedReturnAcrValue = view.openId.expectedReturnAcrValue;
|
||||||
} else if (api.configType === SsoType.Saml2) {
|
} else if (api.configType === SsoType.Saml2) {
|
||||||
|
api.spUniqueEntityId = view.saml.spUniqueEntityId;
|
||||||
api.spNameIdFormat = view.saml.spNameIdFormat;
|
api.spNameIdFormat = view.saml.spNameIdFormat;
|
||||||
api.spOutboundSigningAlgorithm = view.saml.spOutboundSigningAlgorithm;
|
api.spOutboundSigningAlgorithm = view.saml.spOutboundSigningAlgorithm;
|
||||||
api.spSigningBehavior = view.saml.spSigningBehavior;
|
api.spSigningBehavior = view.saml.spSigningBehavior;
|
||||||
@ -72,6 +73,7 @@ export class SsoConfigApi extends BaseResponse {
|
|||||||
expectedReturnAcrValue: string;
|
expectedReturnAcrValue: string;
|
||||||
|
|
||||||
// SAML
|
// SAML
|
||||||
|
spUniqueEntityId: boolean;
|
||||||
spNameIdFormat: Saml2NameIdFormat;
|
spNameIdFormat: Saml2NameIdFormat;
|
||||||
spOutboundSigningAlgorithm: string;
|
spOutboundSigningAlgorithm: string;
|
||||||
spSigningBehavior: Saml2SigningBehavior;
|
spSigningBehavior: Saml2SigningBehavior;
|
||||||
@ -113,6 +115,7 @@ export class SsoConfigApi extends BaseResponse {
|
|||||||
this.acrValues = this.getResponseProperty("AcrValues");
|
this.acrValues = this.getResponseProperty("AcrValues");
|
||||||
this.expectedReturnAcrValue = this.getResponseProperty("ExpectedReturnAcrValue");
|
this.expectedReturnAcrValue = this.getResponseProperty("ExpectedReturnAcrValue");
|
||||||
|
|
||||||
|
this.spUniqueEntityId = this.getResponseProperty("SpUniqueEntityId");
|
||||||
this.spNameIdFormat = this.getResponseProperty("SpNameIdFormat");
|
this.spNameIdFormat = this.getResponseProperty("SpNameIdFormat");
|
||||||
this.spOutboundSigningAlgorithm = this.getResponseProperty("SpOutboundSigningAlgorithm");
|
this.spOutboundSigningAlgorithm = this.getResponseProperty("SpOutboundSigningAlgorithm");
|
||||||
this.spSigningBehavior = this.getResponseProperty("SpSigningBehavior");
|
this.spSigningBehavior = this.getResponseProperty("SpSigningBehavior");
|
||||||
|
@ -23,6 +23,7 @@ class SsoUrls extends BaseResponse {
|
|||||||
callbackPath: string;
|
callbackPath: string;
|
||||||
signedOutCallbackPath: string;
|
signedOutCallbackPath: string;
|
||||||
spEntityId: string;
|
spEntityId: string;
|
||||||
|
spEntityIdStatic: string;
|
||||||
spMetadataUrl: string;
|
spMetadataUrl: string;
|
||||||
spAcsUrl: string;
|
spAcsUrl: string;
|
||||||
|
|
||||||
@ -31,6 +32,7 @@ class SsoUrls extends BaseResponse {
|
|||||||
this.callbackPath = this.getResponseProperty("CallbackPath");
|
this.callbackPath = this.getResponseProperty("CallbackPath");
|
||||||
this.signedOutCallbackPath = this.getResponseProperty("SignedOutCallbackPath");
|
this.signedOutCallbackPath = this.getResponseProperty("SignedOutCallbackPath");
|
||||||
this.spEntityId = this.getResponseProperty("SpEntityId");
|
this.spEntityId = this.getResponseProperty("SpEntityId");
|
||||||
|
this.spEntityIdStatic = this.getResponseProperty("SpEntityIdStatic");
|
||||||
this.spMetadataUrl = this.getResponseProperty("SpMetadataUrl");
|
this.spMetadataUrl = this.getResponseProperty("SpMetadataUrl");
|
||||||
this.spAcsUrl = this.getResponseProperty("SpAcsUrl");
|
this.spAcsUrl = this.getResponseProperty("SpAcsUrl");
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ export class SsoConfigView extends View {
|
|||||||
};
|
};
|
||||||
|
|
||||||
saml: {
|
saml: {
|
||||||
|
spUniqueEntityId: boolean;
|
||||||
spNameIdFormat: Saml2NameIdFormat;
|
spNameIdFormat: Saml2NameIdFormat;
|
||||||
spOutboundSigningAlgorithm: string;
|
spOutboundSigningAlgorithm: string;
|
||||||
spSigningBehavior: Saml2SigningBehavior;
|
spSigningBehavior: Saml2SigningBehavior;
|
||||||
@ -88,6 +89,7 @@ export class SsoConfigView extends View {
|
|||||||
};
|
};
|
||||||
} else if (this.configType === SsoType.Saml2) {
|
} else if (this.configType === SsoType.Saml2) {
|
||||||
this.saml = {
|
this.saml = {
|
||||||
|
spUniqueEntityId: orgSsoResponse.data.spUniqueEntityId,
|
||||||
spNameIdFormat: orgSsoResponse.data.spNameIdFormat,
|
spNameIdFormat: orgSsoResponse.data.spNameIdFormat,
|
||||||
spOutboundSigningAlgorithm: orgSsoResponse.data.spOutboundSigningAlgorithm,
|
spOutboundSigningAlgorithm: orgSsoResponse.data.spOutboundSigningAlgorithm,
|
||||||
spSigningBehavior: orgSsoResponse.data.spSigningBehavior,
|
spSigningBehavior: orgSsoResponse.data.spSigningBehavior,
|
||||||
|
Loading…
Reference in New Issue
Block a user