fix(SSO): SAML認証のパラメータを修正

This commit is contained in:
まっちゃとーにゅ 2024-03-17 23:34:59 +09:00
parent beab1e09bb
commit fa4db2c420
No known key found for this signature in database
GPG Key ID: 6AFBBF529601C1DB

View File

@ -81,7 +81,7 @@ export class SAMLIdentifyProviderService {
const nodes = { const nodes = {
'md:EntityDescriptor': { 'md:EntityDescriptor': {
'@xmlns:md': 'urn:oasis:names:tc:SAML:2.0:metadata', '@xmlns:md': 'urn:oasis:names:tc:SAML:2.0:metadata',
'@entityID': this.config.url, '@entityID': `${this.config.url}/sso/saml/${provider.id}/metadata`,
'@validUntil': tenYearsLater, '@validUntil': tenYearsLater,
'md:IDPSSODescriptor': { 'md:IDPSSODescriptor': {
'@WantAuthnRequestsSigned': provider.wantAuthnRequestsSigned, '@WantAuthnRequestsSigned': provider.wantAuthnRequestsSigned,
@ -460,7 +460,7 @@ export class SAMLIdentifyProviderService {
'@Destination': ssoServiceProvider.acsUrl, '@Destination': ssoServiceProvider.acsUrl,
'@InResponseTo': this.get(flowResult, 'extract.request.id', ''), '@InResponseTo': this.get(flowResult, 'extract.request.id', ''),
'saml:Issuer': { 'saml:Issuer': {
'#text': ssoServiceProvider.issuer, '#text': `${this.config.url}/sso/saml/${ssoServiceProvider.id}/metadata`,
}, },
'samlp:Status': { 'samlp:Status': {
'samlp:StatusCode': { 'samlp:StatusCode': {
@ -474,7 +474,7 @@ export class SAMLIdentifyProviderService {
'@Version': '2.0', '@Version': '2.0',
'@IssueInstant': now, '@IssueInstant': now,
'saml:Issuer': { 'saml:Issuer': {
'#text': ssoServiceProvider.issuer, '#text': `${this.config.url}/sso/saml/${ssoServiceProvider.id}/metadata`,
}, },
'saml:Subject': { 'saml:Subject': {
'saml:NameID': profile.emailVerified 'saml:NameID': profile.emailVerified