Merge pull request #13219 from Budibase/BUDI-8046/constrain-scim-endpoints

Constrain SCIM endpoints
This commit is contained in:
Adria Navarro 2024-03-08 13:31:46 +01:00 committed by GitHub
commit 9331abd71d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 16 deletions

@ -1 +1 @@
Subproject commit 0eca5d2fce599dbec35bb02e7ed46054bae9a28d
Subproject commit a1604e6a29ece75aba1e0b1fbbc074ef357493aa

View File

@ -23,6 +23,6 @@
"typescript": "5.2.2"
},
"dependencies": {
"scim-patch": "^0.7.0"
"scim-patch": "^0.8.1"
}
}

View File

@ -13,20 +13,17 @@ import { events } from "@budibase/backend-core"
jest.setTimeout(30000)
describe("scim", () => {
beforeAll(async () => {
tk.freeze(mocks.date.MOCK_DATE)
mocks.licenses.useScimIntegration()
await config.setSCIMConfig(true)
})
beforeEach(async () => {
async function setup() {
jest.resetAllMocks()
tk.freeze(mocks.date.MOCK_DATE)
mocks.licenses.useScimIntegration()
mocks.licenses.useGroups()
await config.setSCIMConfig(true)
})
}
beforeAll(setup)
beforeEach(setup)
const config = new TestConfiguration()
@ -718,7 +715,6 @@ describe("scim", () => {
})
it("can fetch groups even if internal groups exist", async () => {
mocks.licenses.useGroups()
await config.api.groups.saveGroup(structures.userGroups.userGroup())
await config.api.groups.saveGroup(structures.userGroups.userGroup())

View File

@ -5666,6 +5666,13 @@
dependencies:
undici-types "~5.26.4"
"@types/node@^20.4.5":
version "20.11.25"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.25.tgz#0f50d62f274e54dd7a49f7704cc16bfbcccaf49f"
integrity sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==
dependencies:
undici-types "~5.26.4"
"@types/nodemailer@^6.4.4":
version "6.4.14"
resolved "https://registry.yarnpkg.com/@types/nodemailer/-/nodemailer-6.4.14.tgz#5c81a5e856db7f8ede80013e6dbad7c5fb2283e2"
@ -19491,11 +19498,12 @@ schema-utils@^3.1.1, schema-utils@^3.1.2:
ajv "^6.12.5"
ajv-keywords "^3.5.2"
scim-patch@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/scim-patch/-/scim-patch-0.7.0.tgz#3f6d94256c07be415a74a49c0ff48dc91e4e0219"
integrity sha512-wXKcsZl+aLfE0yId7MjiOd91v8as6dEYLFvm1gGu3yJxSPhl1Fl3vWiNN4V3D68UKpqO/umK5rwWc8wGpBaOHw==
scim-patch@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/scim-patch/-/scim-patch-0.8.1.tgz#611bfdb5538f6d8b97aba0ab0f8bd01055b70c1c"
integrity sha512-JRYTA+mJZ8Z5DJGO7kkFc0lGCDs100rNs7iN77mld7gQajTp1R1xjUzMfZTOMAkBDA75GSdbMmfdfMqMJCn/Yg==
dependencies:
"@types/node" "^20.4.5"
fast-deep-equal "3.1.3"
scim2-parse-filter "0.2.8"