Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Business Portal, add SSO configuration models (#506)
- Loading branch information
Showing
14 changed files
with
175 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
export enum Permissions { | ||
AccessBusinessPortal = 0, | ||
AccessEventLogs = 1, | ||
AccessImportExport = 2, | ||
AccessReports = 3, | ||
AccessEventLogs, | ||
AccessImportExport, | ||
AccessReports, | ||
/** | ||
* @deprecated Sep 29 2021: This permission has been split out to `createNewCollections`, `editAnyCollection`, and | ||
* `deleteAnyCollection`. It exists here for backwards compatibility with Server versions <= 1.43.0 | ||
*/ | ||
ManageAllCollections = 4, | ||
ManageAllCollections, | ||
/** | ||
* @deprecated Sep 29 2021: This permission has been split out to `editAssignedCollections` and | ||
* `deleteAssignedCollections`. It exists here for backwards compatibility with Server versions <= 1.43.0 | ||
*/ | ||
ManageAssignedCollections = 5, | ||
ManageGroups = 6, | ||
ManageOrganization = 7, | ||
ManagePolicies = 8, | ||
ManageProvider = 9, | ||
ManageUsers = 10, | ||
ManageUsersPassword = 11, | ||
CreateNewCollections = 12, | ||
EditAnyCollection = 13, | ||
DeleteAnyCollection = 14, | ||
EditAssignedCollections = 15, | ||
DeleteAssignedCollections = 16, | ||
ManageAssignedCollections, | ||
ManageGroups, | ||
ManageOrganization , | ||
ManagePolicies, | ||
ManageProvider, | ||
ManageUsers, | ||
ManageUsersPassword, | ||
CreateNewCollections, | ||
EditAnyCollection, | ||
DeleteAnyCollection, | ||
EditAssignedCollections, | ||
DeleteAssignedCollections, | ||
ManageSso, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
import { BaseResponse } from '../response/baseResponse'; | ||
|
||
enum SsoType { | ||
OpenIdConnect = 1, | ||
Saml2 = 2, | ||
} | ||
|
||
enum OpenIdConnectRedirectBehavior { | ||
RedirectGet = 0, | ||
FormPost = 1, | ||
} | ||
|
||
enum Saml2BindingType { | ||
HttpRedirect = 1, | ||
HttpPost = 2, | ||
Artifact = 4, | ||
} | ||
|
||
enum Saml2NameIdFormat { | ||
NotConfigured = 0, | ||
Unspecified = 1, | ||
EmailAddress = 2, | ||
X509SubjectName = 3, | ||
WindowsDomainQualifiedName = 4, | ||
KerberosPrincipalName = 5, | ||
EntityIdentifier = 6, | ||
Persistent = 7, | ||
Transient = 8, | ||
} | ||
|
||
enum Saml2SigningBehavior { | ||
IfIdpWantAuthnRequestsSigned = 0, | ||
Always = 1, | ||
Never = 3, | ||
} | ||
|
||
export class SsoConfigApi extends BaseResponse { | ||
configType: SsoType; | ||
|
||
// OpenId | ||
authority: string; | ||
clientId: string; | ||
clientSecret: string; | ||
metadataAddress: string; | ||
redirectBehavior: OpenIdConnectRedirectBehavior; | ||
getClaimsFromUserInfoEndpoint: boolean; | ||
additionalScopes: string; | ||
additionalUserIdClaimTypes: string; | ||
additionalEmailClaimTypes: string; | ||
additionalNameClaimTypes: string; | ||
acrValues: string; | ||
expectedReturnAcrValue: string; | ||
|
||
// SAML | ||
spNameIdFormat: Saml2NameIdFormat; | ||
spOutboundSigningAlgorithm: string; | ||
spSigningBehavior: Saml2SigningBehavior; | ||
spMinIncomingSigningAlgorithm: boolean; | ||
spWantAssertionsSigned: boolean; | ||
spValidateCertificates: boolean; | ||
|
||
idpEntityId: string; | ||
idpBindingType: Saml2BindingType; | ||
idpSingleSignOnServiceUrl: string; | ||
idpSingleLogoutServiceUrl: string; | ||
idpArtifactResolutionServiceUrl: string; | ||
idpX509PublicCert: string; | ||
idpOutboundSigningAlgorithm: string; | ||
idpAllowUnsolicitedAuthnResponse: boolean; | ||
idpDisableOutboundLogoutRequests: boolean; | ||
idpWantAuthnRequestsSigned: boolean; | ||
|
||
constructor(data: any = null) { | ||
super(data); | ||
if (data == null) { | ||
return; | ||
} | ||
|
||
this.configType = this.getResponseProperty('ConfigType'); | ||
|
||
this.authority = this.getResponseProperty('Authority'); | ||
this.clientId = this.getResponseProperty('ClientId'); | ||
this.clientSecret = this.getResponseProperty('ClientSecret'); | ||
this.metadataAddress = this.getResponseProperty('MetadataAddress'); | ||
this.redirectBehavior = this.getResponseProperty('RedirectBehavior'); | ||
this.getClaimsFromUserInfoEndpoint = this.getResponseProperty('GetClaimsFromUserInfoEndpoint'); | ||
this.additionalScopes = this.getResponseProperty('AdditionalScopes'); | ||
this.additionalUserIdClaimTypes = this.getResponseProperty('AdditionalUserIdClaimTypes'); | ||
this.additionalEmailClaimTypes = this.getResponseProperty('AdditionalEmailClaimTypes'); | ||
this.additionalNameClaimTypes = this.getResponseProperty('AdditionalNameClaimTypes'); | ||
this.acrValues = this.getResponseProperty('AcrValues'); | ||
this.expectedReturnAcrValue = this.getResponseProperty('ExpectedReturnAcrValue'); | ||
|
||
this.spNameIdFormat = this.getResponseProperty('SpNameIdFormat'); | ||
this.spOutboundSigningAlgorithm = this.getResponseProperty('SpOutboundSigningAlgorithm'); | ||
this.spSigningBehavior = this.getResponseProperty('SpSigningBehavior'); | ||
this.spMinIncomingSigningAlgorithm = this.getResponseProperty('SpMinIncomingSigningAlgorithm'); | ||
this.spWantAssertionsSigned = this.getResponseProperty('SpWantAssertionsSigned'); | ||
this.spValidateCertificates = this.getResponseProperty('SpValidateCertificates'); | ||
|
||
this.idpEntityId = this.getResponseProperty('IdpEntityId'); | ||
this.idpBindingType = this.getResponseProperty('IdpBindingType'); | ||
this.idpSingleSignOnServiceUrl = this.getResponseProperty('IdpSingleSignOnServiceUrl'); | ||
this.idpSingleLogoutServiceUrl = this.getResponseProperty('IdpSingleLogoutServiceUrl'); | ||
this.idpArtifactResolutionServiceUrl = this.getResponseProperty('IdpArtifactResolutionServiceUrl'); | ||
this.idpX509PublicCert = this.getResponseProperty('IdpX509PublicCert'); | ||
this.idpOutboundSigningAlgorithm = this.getResponseProperty('IdpOutboundSigningAlgorithm'); | ||
this.idpAllowUnsolicitedAuthnResponse = this.getResponseProperty('IdpAllowUnsolicitedAuthnResponse'); | ||
this.idpDisableOutboundLogoutRequests = this.getResponseProperty('IdpDisableOutboundLogoutRequests'); | ||
this.idpWantAuthnRequestsSigned = this.getResponseProperty('IdpWantAuthnRequestsSigned'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
common/src/models/request/organization/organizationSsoRequest.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { SsoConfigApi } from '../../api/ssoConfigApi'; | ||
|
||
export class OrganizationSsoRequest { | ||
enabled: boolean = false; | ||
data: SsoConfigApi; | ||
} |
23 changes: 23 additions & 0 deletions
23
common/src/models/response/organization/organizationSsoResponse.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { SsoConfigApi } from '../../api/ssoConfigApi'; | ||
import { BaseResponse } from '../baseResponse'; | ||
|
||
export class OrganizationSsoResponse extends BaseResponse { | ||
enabled: boolean; | ||
data: SsoConfigApi; | ||
urls: SsoUrls; | ||
|
||
constructor(response: any) { | ||
super(response); | ||
this.enabled = this.getResponseProperty('Enabled'); | ||
this.data = new SsoConfigApi(this.getResponseProperty('Data')); | ||
this.urls = this.getResponseProperty('Urls'); | ||
} | ||
} | ||
|
||
type SsoUrls = { | ||
callbackPath: string; | ||
signedOutCallbackPath: string; | ||
spEntityId: string; | ||
spMetadataUrl: string; | ||
spAcsUrl: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.