Skip to content

Conversation

@sighphyre
Copy link
Member

@sighphyre sighphyre commented Sep 3, 2024

Adds simple/OIDC and SAML settings to the generated client.

Also fixes a test that broke in the users API, this isn't a breaking change against Unleash but it is a breaking change for the public API for this project

This needed some changes to the Unleash enterprise OpenAPI schemas but thankfully should work with older versions of Unleash

This is currently failing on 5.8 and below because there's no way to get root roles for older versions of settings

updateUser.RootRole = &rootRole

resp, httpRes, err := apiClient.UsersAPI.UpdateUser(context.Background(), id).UpdateUserSchema(*updateUser).Execute()
resp, httpRes, err := apiClient.UsersAPI.UpdateUser(context.Background(), user.Id).UpdateUserSchema(*updateUser).Execute()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caused by a change in upstream types. This becomes a string internally anyway so it won't break against Unleash but does require users of this project to change their types when using the API

timeout: 1m
retries: 5
start_period: 10s
mock-openid-server:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional but weird. When striking OIDC endpoints in Unleash, Unleash will make a call to retrieve the well known OIDC config. If it does not find that config, it will fail the call to set OIDC config, but only after it's blocked for a few seconds. It's seriously rude to be striking someone's OIDC config endpoint in tests so this spins up a Python HTTP server which will serve up a valid well known OIDC config for the tests to consume

Copy link
Collaborator

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sighphyre sighphyre merged commit 21e548b into main Sep 4, 2024
@sighphyre sighphyre deleted the feat/sso-settings branch September 4, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants