-
Notifications
You must be signed in to change notification settings - Fork 332
WPB-685 give SCIM connections human readable names #4307
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
Merged
battermann
merged 21 commits into
develop
from
WPB-685-give-scim-connections-human-readable-names-in-tm
Oct 25, 2024
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
965a3a0
refactor record field names
battermann a941da8
golden tests
battermann 811b236
schema profunctor
battermann c88012e
added optional name field
battermann 98a64d1
versioned req body
battermann c44d6f0
create new endpoint for v7
battermann 2226790
more toschema refactorings
battermann 85382e7
updated golden test
battermann 2070822
added name to tokeninfo
battermann c53ef12
introduced CreateScimTokenResponseV6
battermann 60305db
failing test
battermann dcd5351
new version for list scim tokens endpoint
battermann 97ced43
db migration
battermann eb066a4
update data access
battermann 9c5cf9b
use versioned requests in spar integration
battermann 54c8abb
fix test, implement update name handler
battermann e643594
changelog
battermann f34eb92
linting
battermann 39f5df5
linter again
battermann 378d614
formatting
battermann 3730068
small clean up
battermann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 @@ | ||
| New variant in API version 7 of endpoints for creating and listing SCIM tokens that support a `name` field. New endpoint in version 7 for updating a SCIM token name. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't forget to add it to the changelog in confluence :) |
||
This file contains hidden or 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 @@ | ||
| Added human readable names for SCIM tokens |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -25,7 +25,6 @@ import SAML2.WebSSO qualified as SAML | |
| import Servant | ||
| import Servant.API.Extended | ||
| import Servant.Multipart | ||
| import Servant.OpenApi | ||
| import URI.ByteString qualified as URI | ||
| import Web.Scim.Capabilities.MetaSchema as Scim.Meta | ||
| import Web.Scim.Class.Auth as Scim.Auth | ||
|
|
@@ -37,6 +36,8 @@ import Wire.API.Routes.API | |
| import Wire.API.Routes.Internal.Spar | ||
| import Wire.API.Routes.Named | ||
| import Wire.API.Routes.Public | ||
| import Wire.API.Routes.Version | ||
| import Wire.API.Routes.Versioned | ||
| import Wire.API.SwaggerServant | ||
| import Wire.API.User.IdentityProvider | ||
| import Wire.API.User.Saml | ||
|
|
@@ -188,9 +189,21 @@ data ScimSite tag route = ScimSite | |
| deriving (Generic) | ||
|
|
||
| type APIScimToken = | ||
| Named "auth-tokens-create" (ZOptUser :> APIScimTokenCreate) | ||
| Named "auth-tokens-create@v6" (Until 'V7 :> ZOptUser :> APIScimTokenCreateV6) | ||
| :<|> Named "auth-tokens-create" (From 'V7 :> ZOptUser :> APIScimTokenCreate) | ||
| :<|> Named "auth-tokens-put-name" (From 'V7 :> ZUser :> APIScimTokenPutName) | ||
| :<|> Named "auth-tokens-delete" (ZOptUser :> APIScimTokenDelete) | ||
| :<|> Named "auth-tokens-list" (ZOptUser :> APIScimTokenList) | ||
| :<|> Named "auth-tokens-list@v6" (Until 'V7 :> ZOptUser :> APIScimTokenListV6) | ||
| :<|> Named "auth-tokens-list" (From 'V7 :> ZOptUser :> APIScimTokenList) | ||
|
|
||
| type APIScimTokenPutName = | ||
| Capture "id" ScimTokenId | ||
| :> ReqBody '[JSON] ScimTokenName | ||
| :> Put '[JSON] () | ||
|
|
||
| type APIScimTokenCreateV6 = | ||
| VersionedReqBody 'V6 '[JSON] CreateScimToken | ||
| :> Post '[JSON] CreateScimTokenResponseV6 | ||
|
|
||
| type APIScimTokenCreate = | ||
| ReqBody '[JSON] CreateScimToken | ||
|
|
@@ -203,9 +216,10 @@ type APIScimTokenDelete = | |
| type APIScimTokenList = | ||
| Get '[JSON] ScimTokenList | ||
|
|
||
| type APIScimTokenListV6 = | ||
| Get '[JSON] ScimTokenListV6 | ||
|
|
||
| data SparAPITag | ||
|
|
||
| instance ServiceAPI SparAPITag v where | ||
| type ServiceAPIRoutes SparAPITag = SparAPI | ||
| type SpecialisedAPIRoutes v SparAPITag = SparAPI | ||
| serviceSwagger = toOpenApi (Proxy @SparAPI) | ||
|
Comment on lines
-210
to
-211
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where did this go? |
||
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.