mirror of
https://github.com/bitwarden/web
synced 2025-12-10 05:13:40 +00:00
Disable key connector when org doesn't have the feature (#1301)
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
{{'ssoPolicyHelpStart' | i18n}}
|
{{'ssoPolicyHelpStart' | i18n}}
|
||||||
<a routerLink="../policies">{{'ssoPolicyHelpLink' | i18n}}</a>
|
<a routerLink="../policies">{{'ssoPolicyHelpLink' | i18n}}</a>
|
||||||
{{'ssoPolicyHelpEnd' | i18n}}
|
{{'ssoPolicyHelpEnd' | i18n}}
|
||||||
|
<br>
|
||||||
|
{{'ssoPolicyHelpKeyConnector' | i18n}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -25,22 +27,27 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{'memberDecryptionOption' | i18n}}</label>
|
<label>{{'memberDecryptionOption' | i18n}}</label>
|
||||||
<div class="form-check form-check-block">
|
<div class="form-check form-check-block">
|
||||||
<input class="form-check-input" type="radio" id="memberDecryptionPass" [value]="false" formControlName="useKeyConnector">
|
<input class="form-check-input" type="radio" id="memberDecryptionPass" [value]="false" formControlName="keyConnectorEnabled">
|
||||||
<label class="form-check-label" for="memberDecryptionPass">
|
<label class="form-check-label" for="memberDecryptionPass">
|
||||||
{{'masterPass' | i18n}}
|
{{'masterPass' | i18n}}
|
||||||
<small>{{'memberDecryptionPassDesc' | i18n}}</small>
|
<small>{{'memberDecryptionPassDesc' | i18n}}</small>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check mt-2 form-check-block">
|
<div class="form-check mt-2 form-check-block">
|
||||||
<input class="form-check-input" type="radio" id="memberDecryptionKey" [value]="true" formControlName="useKeyConnector">
|
<input class="form-check-input" type="radio" id="memberDecryptionKey" [value]="true" formControlName="keyConnectorEnabled"
|
||||||
|
[attr.disabled]="!organization.useKeyConnector || null">
|
||||||
<label class="form-check-label" for="memberDecryptionKey">
|
<label class="form-check-label" for="memberDecryptionKey">
|
||||||
{{'keyConnector' | i18n}}
|
{{'keyConnector' | i18n}}
|
||||||
|
<a target="_blank" rel="noopener" appA11yTitle="{{'learnMore' | i18n}}"
|
||||||
|
href="https://bitwarden.com/help/article/about-key-connector/">
|
||||||
|
<i class="fa fa-question-circle-o" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
<small>{{'memberDecryptionKeyConnectorDesc' | i18n}}</small>
|
<small>{{'memberDecryptionKeyConnectorDesc' | i18n}}</small>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngIf="data.value.useKeyConnector">
|
<ng-container *ngIf="data.value.keyConnectorEnabled">
|
||||||
<app-callout type="warning" [useAlertRole]="true">
|
<app-callout type="warning" [useAlertRole]="true">
|
||||||
{{'keyConnectorWarning' | i18n}}
|
{{'keyConnectorWarning' | i18n}}
|
||||||
</app-callout>
|
</app-callout>
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import { ActivatedRoute } from '@angular/router';
|
|||||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||||
|
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||||
|
|
||||||
|
import { Organization } from 'jslib-common/models/domain/organization';
|
||||||
|
|
||||||
import { OrganizationSsoRequest } from 'jslib-common/models/request/organization/organizationSsoRequest';
|
import { OrganizationSsoRequest } from 'jslib-common/models/request/organization/organizationSsoRequest';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -25,6 +29,7 @@ export class SsoComponent implements OnInit {
|
|||||||
|
|
||||||
loading = true;
|
loading = true;
|
||||||
organizationId: string;
|
organizationId: string;
|
||||||
|
organization: Organization;
|
||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
callbackPath: string;
|
callbackPath: string;
|
||||||
@@ -37,7 +42,7 @@ export class SsoComponent implements OnInit {
|
|||||||
data = this.fb.group({
|
data = this.fb.group({
|
||||||
configType: [],
|
configType: [],
|
||||||
|
|
||||||
useKeyConnector: [],
|
keyConnectorEnabled: [],
|
||||||
keyConnectorUrl: [],
|
keyConnectorUrl: [],
|
||||||
|
|
||||||
// OpenId
|
// OpenId
|
||||||
@@ -75,7 +80,8 @@ export class SsoComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
constructor(private fb: FormBuilder, private route: ActivatedRoute, private apiService: ApiService,
|
constructor(private fb: FormBuilder, private route: ActivatedRoute, private apiService: ApiService,
|
||||||
private platformUtilsService: PlatformUtilsService, private i18nService: I18nService) { }
|
private platformUtilsService: PlatformUtilsService, private i18nService: I18nService,
|
||||||
|
private userService: UserService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.route.parent.parent.params.subscribe(async params => {
|
this.route.parent.parent.params.subscribe(async params => {
|
||||||
@@ -85,6 +91,7 @@ export class SsoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
|
this.organization = await this.userService.getOrganization(this.organizationId);
|
||||||
const ssoSettings = await this.apiService.getOrganizationSso(this.organizationId);
|
const ssoSettings = await this.apiService.getOrganizationSso(this.organizationId);
|
||||||
|
|
||||||
this.data.patchValue(ssoSettings.data);
|
this.data.patchValue(ssoSettings.data);
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: 720967475b...e1b1efeea2
@@ -49,6 +49,6 @@ export class MasterPasswordPolicyComponent extends BasePolicyComponent {
|
|||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
super.ngOnInit();
|
super.ngOnInit();
|
||||||
const organization = await this.userService.getOrganization(this.policyResponse.organizationId);
|
const organization = await this.userService.getOrganization(this.policyResponse.organizationId);
|
||||||
this.showKeyConnectorInfo = organization.usesKeyConnector;
|
this.showKeyConnectorInfo = organization.keyConnectorEnabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,6 @@ export class ResetPasswordPolicyComponent extends BasePolicyComponent {
|
|||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
super.ngOnInit();
|
super.ngOnInit();
|
||||||
const organization = await this.userService.getOrganization(this.policyResponse.organizationId);
|
const organization = await this.userService.getOrganization(this.policyResponse.organizationId);
|
||||||
this.showKeyConnectorInfo = organization.usesKeyConnector;
|
this.showKeyConnectorInfo = organization.keyConnectorEnabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4511,15 +4511,18 @@
|
|||||||
},
|
},
|
||||||
"ssoPolicyHelpStart": {
|
"ssoPolicyHelpStart": {
|
||||||
"message": "Enable the",
|
"message": "Enable the",
|
||||||
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Policy to require all members to log in with SSO.'"
|
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Authentication policy to require all members to log in with SSO.'"
|
||||||
},
|
},
|
||||||
"ssoPolicyHelpLink": {
|
"ssoPolicyHelpLink": {
|
||||||
"message": "SSO Policy",
|
"message": "SSO Authentication policy",
|
||||||
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Policy to require all members to log in with SSO.'"
|
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Authentication policy to require all members to log in with SSO.'"
|
||||||
},
|
},
|
||||||
"ssoPolicyHelpEnd": {
|
"ssoPolicyHelpEnd": {
|
||||||
"message": "to require all members to log in with SSO.",
|
"message": "to require all members to log in with SSO.",
|
||||||
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Policy to require all members to log in with SSO.'"
|
"description": "This will be used as part of a larger sentence, broken up to include links. The full sentence will read 'Enable the SSO Authentication policy to require all members to log in with SSO.'"
|
||||||
|
},
|
||||||
|
"ssoPolicyHelpKeyConnector": {
|
||||||
|
"message": "SSO Authentication and Single Organization policies are required to set up Key Connector decryption."
|
||||||
},
|
},
|
||||||
"memberDecryptionOption": {
|
"memberDecryptionOption": {
|
||||||
"message": "Member Decryption Options"
|
"message": "Member Decryption Options"
|
||||||
@@ -4531,7 +4534,7 @@
|
|||||||
"message": "Key Connector"
|
"message": "Key Connector"
|
||||||
},
|
},
|
||||||
"memberDecryptionKeyConnectorDesc": {
|
"memberDecryptionKeyConnectorDesc": {
|
||||||
"message": "Connect Login with SSO to your self-hosted decryption key server. Using this option, members won’t need to use their Master Passwords to decrypt vault data."
|
"message": "Connect Login with SSO to your self-hosted decryption key server. Using this option, members won’t need to use their Master Passwords to decrypt vault data. Contact Bitwarden Support for set up assistance."
|
||||||
},
|
},
|
||||||
"keyConnectorPolicyRestriction": {
|
"keyConnectorPolicyRestriction": {
|
||||||
"message": "\"Login with SSO and Key Connector Decryption\" is enabled. This policy will only apply to Owners and Admins."
|
"message": "\"Login with SSO and Key Connector Decryption\" is enabled. This policy will only apply to Owners and Admins."
|
||||||
@@ -4549,7 +4552,7 @@
|
|||||||
"message": "Disabled Key Connector"
|
"message": "Disabled Key Connector"
|
||||||
},
|
},
|
||||||
"keyConnectorWarning": {
|
"keyConnectorWarning": {
|
||||||
"message": "Once Key Connector is set up, Member Decryption Options cannot be changed."
|
"message": "Once members begin using Key Connector, your Organization cannot revert to Master Password decryption. Proceed only if you are comfortable deploying and managing a key server."
|
||||||
},
|
},
|
||||||
"migratedKeyConnector": {
|
"migratedKeyConnector": {
|
||||||
"message": "Migrated to Key Connector"
|
"message": "Migrated to Key Connector"
|
||||||
|
|||||||
Reference in New Issue
Block a user