mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:17:33 +00:00
feat(console): app compliance messages, dev mode (#575)
* app compliance messages, show devmode * clnup * Update console/src/assets/i18n/de.json Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> * Update console/src/assets/i18n/en.json Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> * Update console/src/assets/i18n/de.json Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
This commit is contained in:
@@ -43,6 +43,12 @@
|
|||||||
<button mat-stroked-button
|
<button mat-stroked-button
|
||||||
(click)="regenerateOIDCClientSecret()">{{'APP.OIDC.REGENERATESECRET' | translate}}</button>
|
(click)="regenerateOIDCClientSecret()">{{'APP.OIDC.REGENERATESECRET' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="compliance">
|
||||||
|
<p class="problem" *ngFor="let problem of app.oidcConfig.complianceProblemsList">
|
||||||
|
{{problem.localizedMessage}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<form *ngIf="appForm" [formGroup]="appForm" (ngSubmit)="saveOIDCApp()">
|
<form *ngIf="appForm" [formGroup]="appForm" (ngSubmit)="saveOIDCApp()">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<mat-form-field class="formfield" appearance="outline">
|
<mat-form-field class="formfield" appearance="outline">
|
||||||
@@ -85,6 +91,12 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-slide-toggle color="primary" class="devmode" formControlName="devMode" name="devMode">
|
||||||
|
{{ 'APP.OIDC.DEVMODE' | translate }}
|
||||||
|
</mat-slide-toggle>
|
||||||
|
|
||||||
|
<p class="step-description">{{'APP.OIDC.DEVMODEDESC' | translate}}</p>
|
||||||
<p class="step-description"
|
<p class="step-description"
|
||||||
*ngIf="applicationType?.value == OIDCApplicationType.OIDCAPPLICATIONTYPE_NATIVE">
|
*ngIf="applicationType?.value == OIDCApplicationType.OIDCAPPLICATIONTYPE_NATIVE">
|
||||||
{{'APP.OIDC.REDIRECTDESCRIPTIONNATIVE' | translate}}</p>
|
{{'APP.OIDC.REDIRECTDESCRIPTIONNATIVE' | translate}}</p>
|
||||||
|
@@ -39,6 +39,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.compliance .problem {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@@ -62,6 +66,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.devmode {
|
||||||
|
flex: 1 1 100%;
|
||||||
|
margin: 1rem .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.step-description {
|
.step-description {
|
||||||
font-size: .9rem;
|
font-size: .9rem;
|
||||||
color: #8795a1;
|
color: #8795a1;
|
||||||
|
@@ -98,6 +98,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
|||||||
name: ['', [Validators.required]],
|
name: ['', [Validators.required]],
|
||||||
});
|
});
|
||||||
this.appForm = this.fb.group({
|
this.appForm = this.fb.group({
|
||||||
|
devMode: [false, []],
|
||||||
clientId: [{ value: '', disabled: true }],
|
clientId: [{ value: '', disabled: true }],
|
||||||
responseTypesList: [],
|
responseTypesList: [],
|
||||||
grantTypesList: [],
|
grantTypesList: [],
|
||||||
@@ -195,11 +196,9 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
|||||||
input.value = '';
|
input.value = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public remove(redirect: any, target: RedirectType): void {
|
public remove(redirect: any, target: RedirectType): void {
|
||||||
|
|
||||||
if (target === RedirectType.POSTREDIRECT) {
|
if (target === RedirectType.POSTREDIRECT) {
|
||||||
const index = this.postLogoutRedirectUrisList.indexOf(redirect);
|
const index = this.postLogoutRedirectUrisList.indexOf(redirect);
|
||||||
|
|
||||||
@@ -228,6 +227,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
|||||||
this.app.oidcConfig.authMethodType = this.authMethodType?.value;
|
this.app.oidcConfig.authMethodType = this.authMethodType?.value;
|
||||||
this.app.oidcConfig.redirectUrisList = this.redirectUrisList;
|
this.app.oidcConfig.redirectUrisList = this.redirectUrisList;
|
||||||
this.app.oidcConfig.postLogoutRedirectUrisList = this.postLogoutRedirectUrisList;
|
this.app.oidcConfig.postLogoutRedirectUrisList = this.postLogoutRedirectUrisList;
|
||||||
|
this.app.oidcConfig.devMode = this.devMode?.value;
|
||||||
|
|
||||||
this.projectService
|
this.projectService
|
||||||
.UpdateOIDCAppConfig(this.projectId, this.app.id, this.app.oidcConfig)
|
.UpdateOIDCAppConfig(this.projectId, this.app.id, this.app.oidcConfig)
|
||||||
@@ -284,4 +284,8 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
|||||||
public get authMethodType(): AbstractControl | null {
|
public get authMethodType(): AbstractControl | null {
|
||||||
return this.appForm.get('authMethodType');
|
return this.appForm.get('authMethodType');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get devMode(): AbstractControl | null {
|
||||||
|
return this.appForm.get('devMode');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,6 +14,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||||
import { MatRadioModule } from '@angular/material/radio';
|
import { MatRadioModule } from '@angular/material/radio';
|
||||||
import { MatSelectModule } from '@angular/material/select';
|
import { MatSelectModule } from '@angular/material/select';
|
||||||
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||||
import { MatStepperModule } from '@angular/material/stepper';
|
import { MatStepperModule } from '@angular/material/stepper';
|
||||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
@@ -57,6 +58,7 @@ import { AppsRoutingModule } from './apps-routing.module';
|
|||||||
MatStepperModule,
|
MatStepperModule,
|
||||||
MatRadioModule,
|
MatRadioModule,
|
||||||
CopyToClipboardModule,
|
CopyToClipboardModule,
|
||||||
|
MatSlideToggleModule,
|
||||||
],
|
],
|
||||||
exports: [TranslateModule],
|
exports: [TranslateModule],
|
||||||
})
|
})
|
||||||
|
@@ -50,12 +50,7 @@ import {
|
|||||||
ProjectSearchRequest,
|
ProjectSearchRequest,
|
||||||
ProjectSearchResponse,
|
ProjectSearchResponse,
|
||||||
ProjectUpdateRequest,
|
ProjectUpdateRequest,
|
||||||
ProjectUserGrantSearchRequest,
|
|
||||||
ProjectView,
|
ProjectView,
|
||||||
UserGrant,
|
|
||||||
UserGrantCreate,
|
|
||||||
UserGrantSearchQuery,
|
|
||||||
UserGrantSearchResponse,
|
|
||||||
ZitadelDocs,
|
ZitadelDocs,
|
||||||
} from '../proto/generated/management_pb';
|
} from '../proto/generated/management_pb';
|
||||||
import { GrpcBackendService } from './grpc-backend.service';
|
import { GrpcBackendService } from './grpc-backend.service';
|
||||||
@@ -588,6 +583,7 @@ export class ProjectService {
|
|||||||
req.setPostLogoutRedirectUrisList(oidcConfig.postLogoutRedirectUrisList);
|
req.setPostLogoutRedirectUrisList(oidcConfig.postLogoutRedirectUrisList);
|
||||||
req.setGrantTypesList(oidcConfig.grantTypesList);
|
req.setGrantTypesList(oidcConfig.grantTypesList);
|
||||||
req.setApplicationType(oidcConfig.applicationType);
|
req.setApplicationType(oidcConfig.applicationType);
|
||||||
|
req.setDevMode(oidcConfig.devMode);
|
||||||
return await this.request(
|
return await this.request(
|
||||||
c => c.updateApplicationOIDCConfig,
|
c => c.updateApplicationOIDCConfig,
|
||||||
req,
|
req,
|
||||||
|
@@ -562,7 +562,7 @@
|
|||||||
"TITLEFIRST":"Geben Sie zuerst einen Namen ein!",
|
"TITLEFIRST":"Geben Sie zuerst einen Namen ein!",
|
||||||
"TYPETITLE":"Welche Art von Applikation möchtest du erstellen?",
|
"TYPETITLE":"Welche Art von Applikation möchtest du erstellen?",
|
||||||
"REDIRECTTITLE":"Wohin soll nach dem Login weitergeleitet werden?",
|
"REDIRECTTITLE":"Wohin soll nach dem Login weitergeleitet werden?",
|
||||||
"REDIRECTDESCRIPTIONWEB":"Der redirect muss mit https:// beginnen. http:// ist nur für Testzwecke zulässig!",
|
"REDIRECTDESCRIPTIONWEB":"Der redirect muss mit https:// beginnen. http:// ist nur im Dev Mode zulässig!",
|
||||||
"REDIRECTDESCRIPTIONNATIVE":"Die Weiterleitung muss mit einem eigenen Protokoll oder http://localhost beginnen!",
|
"REDIRECTDESCRIPTIONNATIVE":"Die Weiterleitung muss mit einem eigenen Protokoll oder http://localhost beginnen!",
|
||||||
"REDIRECTNOTVALID":"Diese Weiterleitung ist nicht zulässig!",
|
"REDIRECTNOTVALID":"Diese Weiterleitung ist nicht zulässig!",
|
||||||
"POSTREDIRECTTITLE":"Das ist die Weiterleitung nach einem logout.",
|
"POSTREDIRECTTITLE":"Das ist die Weiterleitung nach einem logout.",
|
||||||
@@ -572,6 +572,8 @@
|
|||||||
"CLIENTSECRET": "Client Secret",
|
"CLIENTSECRET": "Client Secret",
|
||||||
"CLIENTSECRET_DESCRIPTION": "Speichere das Client Secret, da es verschwindet, sobald der Dialog geschlossen wird!",
|
"CLIENTSECRET_DESCRIPTION": "Speichere das Client Secret, da es verschwindet, sobald der Dialog geschlossen wird!",
|
||||||
"REGENERATESECRET": "Client Secret neu generieren",
|
"REGENERATESECRET": "Client Secret neu generieren",
|
||||||
|
"DEVMODE":"Dev Mode",
|
||||||
|
"DEVMODEDESC":"Bei eingeschaltetem Dev Mode werden die Redirect Uris im OIDC Flow nicht validiert.",
|
||||||
"REDIRECT": "Redirect URIs",
|
"REDIRECT": "Redirect URIs",
|
||||||
"REDIRECTSECTION": "Redirect URIs",
|
"REDIRECTSECTION": "Redirect URIs",
|
||||||
"POSTLOGOUTREDIRECT":"Post logout URIs",
|
"POSTLOGOUTREDIRECT":"Post logout URIs",
|
||||||
|
@@ -563,8 +563,8 @@
|
|||||||
"TYPETITLE":"What type of application do you want to create?",
|
"TYPETITLE":"What type of application do you want to create?",
|
||||||
"REDIRECTTITLE":"Specify the urls where the login will redirect to.",
|
"REDIRECTTITLE":"Specify the urls where the login will redirect to.",
|
||||||
"POSTREDIRECTTITLE":"This is the redirect after logout.",
|
"POSTREDIRECTTITLE":"This is the redirect after logout.",
|
||||||
"REDIRECTDESCRIPTIONWEB":"The redirect has to begin with https://. http:// is only valid for testing purposes!",
|
"REDIRECTDESCRIPTIONWEB":"Redirects must begin with https://. http:// is only valid with enabled dev mode.",
|
||||||
"REDIRECTDESCRIPTIONNATIVE":"The redirect has to begin with your own protocol or http://localhost!",
|
"REDIRECTDESCRIPTIONNATIVE":"Redirects must begin with your own protocol or http://localhost!",
|
||||||
"REDIRECTNOTVALID":"This redirect is not valid!",
|
"REDIRECTNOTVALID":"This redirect is not valid!",
|
||||||
"TYPEREQUIRED":"The type is required!",
|
"TYPEREQUIRED":"The type is required!",
|
||||||
"TITLE": "OIDC Configuration",
|
"TITLE": "OIDC Configuration",
|
||||||
@@ -572,6 +572,8 @@
|
|||||||
"CLIENTSECRET": "Client Secret",
|
"CLIENTSECRET": "Client Secret",
|
||||||
"CLIENTSECRET_DESCRIPTION": "Save your Client Secret as it will disappear once the dialog is closed!",
|
"CLIENTSECRET_DESCRIPTION": "Save your Client Secret as it will disappear once the dialog is closed!",
|
||||||
"REGENERATESECRET": "Regenerate Client Secret",
|
"REGENERATESECRET": "Regenerate Client Secret",
|
||||||
|
"DEVMODE":"Dev Mode",
|
||||||
|
"DEVMODEDESC":"With enabled dev mode, redirect uris will not be validated!",
|
||||||
"REDIRECT": "Redirect URIs",
|
"REDIRECT": "Redirect URIs",
|
||||||
"REDIRECTSECTION": "Redirect URIs",
|
"REDIRECTSECTION": "Redirect URIs",
|
||||||
"POSTLOGOUTREDIRECT":"Post logout URIs",
|
"POSTLOGOUTREDIRECT":"Post logout URIs",
|
||||||
|
Reference in New Issue
Block a user