Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(SSO): SAML認証が正常に動作しない問題を修正 #525

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
"nanoid": "5.0.6",
"nested-property": "4.0.0",
"node-fetch": "3.3.2",
"node-forge": "1.3.1",
"nodemailer": "6.9.12",
"nsfwjs": "2.4.2",
"oauth": "0.10.0",
Expand Down Expand Up @@ -213,6 +214,7 @@
"@types/mime-types": "2.1.4",
"@types/ms": "0.7.34",
"@types/node": "20.11.27",
"@types/node-forge": "1.3.11",
"@types/nodemailer": "6.4.14",
"@types/oauth": "0.9.4",
"@types/oauth2orize": "1.11.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
name: ps.name ? ps.name : null,
type: ps.type,
issuer: ps.issuer,
audience: ps.audience?.filter(i => !!i),
audience: ps.audience?.filter(i => i.length > 0) ?? [],
acsUrl: ps.acsUrl,
publicKey: publicKey,
privateKey: privateKey,
Expand Down
5 changes: 5 additions & 0 deletions packages/backend/src/server/api/endpoints/admin/sso/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export const meta = {
type: 'string',
optional: false, nullable: false,
},
useCertificate: {
type: 'boolean',
optional: false, nullable: false,
},
publicKey: {
type: 'string',
optional: false, nullable: false,
Expand Down Expand Up @@ -100,6 +104,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
issuer: service.issuer,
audience: service.audience,
acsUrl: service.acsUrl,
useCertificate: service.privateKey != null,
publicKey: service.publicKey,
signatureAlgorithm: service.signatureAlgorithm,
cipherAlgorithm: service.cipherAlgorithm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
await this.singleSignOnServiceProviderRepository.update(service.id, {
name: ps.name !== '' ? ps.name : null,
issuer: ps.issuer,
audience: ps.audience?.filter(i => !!i),
audience: ps.audience?.filter(i => i.length > 0),
acsUrl: ps.acsUrl,
publicKey: publicKey,
privateKey: privateKey,
Expand Down
Loading
Loading