feat(saml): option to create minimal SAML metadata file (#6671)

* feat: initial look and feel

* feat: initial textarea

* feat: app details and i18n

* fix: add @peintnermax suggestions

* fix: detail component move code to valueChanges.subscribe and clear inputs if metadataurl set

---------

Co-authored-by: Max Peintner <[email protected]>
Co-authored-by: Elio Bischof <[email protected]>
Co-authored-by: Fabi <[email protected]>
Co-authored-by: Tim Möhlmann <[email protected]>
This commit is contained in:
Miguel Cabrerizo
2023-10-25 20:39:28 +03:00
committed by GitHub
co-authored by Max Peintner Elio Bischof Fabi Tim Möhlmann
parent b51ad53e5a
commit 9d77dcb467
17 changed files with 349 additions and 83 deletions
@@ -157,17 +157,22 @@
</form>
</cnsl-card>
<cnsl-card *ngIf="samlForm && app?.samlConfig">
<form [formGroup]="samlForm">
<cnsl-form-field class="formfield">
<cnsl-label>{{ 'APP.SAML.URL' | translate }}</cnsl-label>
<input cnslInput formControlName="metadataUrl" placeholder="https://" />
</cnsl-form-field>
</form>
<cnsl-card *ngIf="samlForm && app?.samlConfig" title="{{ 'APP.SAML.CONFIGSECTION' | translate }}">
<h3 class="title cnsl-secondary-text">
{{ 'APP.SAML.CHOOSEMETADATASOURCE' | translate }}
</h3>
<div class="cnsl-saml-config-line">
<span class="cnsl-app-or cnsl-secondary-text">{{ 'APP.SAML.OR' | translate }}</span>
<div class="metadata-option">
<span class="saml-config-option">{{ 'APP.SAML.METADATAOPT1' | translate }}</span>
<form [formGroup]="samlForm">
<cnsl-form-field class="formfield">
<input cnslInput formControlName="metadataUrl" placeholder="https://" />
</cnsl-form-field>
</form>
</div>
<div class="metadata-option">
<span class="saml-config-option">{{ 'APP.SAML.METADATAOPT2' | translate }}</span>
<input
#xmlFileInput
style="display: none"
@@ -176,11 +181,25 @@
accept="text/xml,application/xml"
(change)="onDropXML($any($event.target).files)"
/>
<button mat-stroked-button (click)="$event.preventDefault(); xmlFileInput.click()">
{{ 'APP.SAML.XML' | translate }}
<button class="upload-button" mat-stroked-button (click)="$event.preventDefault(); xmlFileInput.click()">
{{ 'APP.SAML.UPLOAD' | translate }}
</button>
</div>
<div class="metadata-option">
<span class="saml-config-option">{{ 'APP.SAML.METADATAOPT3' | translate }}</span>
<form [formGroup]="samlForm">
<cnsl-form-field class="formfield">
<cnsl-label>{{ 'APP.SAML.ENTITYID' | translate }}</cnsl-label>
<input cnslInput formControlName="entityId" placeholder="https://" />
</cnsl-form-field>
<cnsl-form-field class="formfield">
<cnsl-label>{{ 'APP.SAML.ACSURL' | translate }}</cnsl-label>
<input cnslInput formControlName="acsURL" placeholder="https://" />
</cnsl-form-field>
</form>
</div>
<div
class="saml-xml"
[ngClass]="{ disabled: !!metadataUrl?.value }"