-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Story #12364: improve saml documentation & #13112: upgrade external p…
…roviders (#1944) * Story#12364: improve saml integration documentation * Story#13112: handle WantsAssertionsSigned and AuthnRequestSigned default values and migration scripts --------- Co-authored-by: Benaissa BENARBIA <benaissa.benarbia.ext@culture.gouv.fr>
- Loading branch information
Showing
9 changed files
with
159 additions
and
33 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
82 changes: 82 additions & 0 deletions
82
deployment/scripts/mongod/v7.1/62_update_existing_external_providers_models.js.j2
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,82 @@ | ||
print("START 61_update_existing_external_providers_models.js.j2"); | ||
|
||
db = db.getSiblingDB('iam'); | ||
|
||
db.providers.updateMany( | ||
{ | ||
internal: false, | ||
$or: [ | ||
{ protocoleType: "SAML" }, | ||
{ protocoleType: "OIDC" } | ||
], | ||
wantsAssertionsSigned: { $exists: false } | ||
}, | ||
[ | ||
{ | ||
$set: { | ||
wantsAssertionsSigned: { | ||
$cond: { | ||
if: { $eq: [{ $type: "$spMetadata" }, "missing"] }, | ||
then: false, | ||
else: { | ||
$cond: { | ||
if: { $regexMatch: { input: "$spMetadata", regex: /WantAssertionsSigned="true"/ } }, | ||
then: true, | ||
else: false | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
); | ||
|
||
|
||
|
||
db.providers.updateMany( | ||
{ | ||
internal: false, | ||
$or: [ | ||
{ protocoleType: "SAML" }, | ||
{ protocoleType: "OIDC" } | ||
], | ||
authnRequestSigned: { $exists: false } | ||
}, | ||
[ | ||
{ | ||
$set: { | ||
authnRequestSigned: { | ||
$cond: { | ||
if: { $eq: [{ $type: "$spMetadata" }, "missing"] }, | ||
then: false, | ||
else: { | ||
$cond: { | ||
if: { $regexMatch: { input: "$spMetadata", regex: /AuthnRequestsSigned="true"/ } }, | ||
then: true, | ||
else: false | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
); | ||
|
||
|
||
db.providers.updateMany( | ||
{ | ||
internal: false, | ||
$or: [ | ||
{ protocoleType: "SAML" }, | ||
{ protocoleType: "OIDC" } | ||
], | ||
propagateLogout: { $exists: false } | ||
}, | ||
{ | ||
$set: { propagateLogout: false } | ||
} | ||
); | ||
|
||
print("END 61_update_existing_external_providers_models.js.j2"); |
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
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