Skip to content

feat: create idp sync page skeleton #14543

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
merged 14 commits into from
Sep 6, 2024
Merged

feat: create idp sync page skeleton #14543

merged 14 commits into from
Sep 6, 2024

Conversation

jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Sep 3, 2024

resolves #14423

This is meant to be a first pass at the IdP Sync page while waiting for the backend work to be completed. Additional, polish and refinement will be handled in #14424

  • Buttons to link to docs page
  • Table for group sync mappings
  • Table for role sync mappings
  • Export policy button
  • Fields for group, role, group auto create and group regex filter
  • ? icon with help tooltip
  • Status indicator for group/role sync fields only when disabled (missing from backend response)
  • Storybook stories
  • Setup mock data

@jaaydenh jaaydenh self-assigned this Sep 3, 2024
@jaaydenh jaaydenh marked this pull request as ready for review September 3, 2024 20:39
Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

Noticed a couple of things, but I'm not going to block on them
I know there's going to be more polish, so I'll leave it to you to decide when these should be addressed

skip_issuer_checks: true,
};

export const IdpSyncPage: FC = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Just calling this out because I don't see anything about this in the commented-out code: do we want to do a redirect if the user navigates to this page if organization.permissions.editMembers is false?

I know we're using that property to define whether we show the page link in the side navbar, but is there anything stopping someone from navigating to the page directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Parkreiner I haven't addressed permissions yet because a permission hasn't been defined for this page. Btw, how do other pages handle this case when the user doesn't have the permissions?

organization_mapping: {},
organization_assign_default: true,
group_auto_create: false,
group_regex_filter: "^Coder-.*$",
Copy link
Member

Choose a reason for hiding this comment

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

I know this is a mock value, but could I get more context on where this regex is used? Is it strictly server-controlled?

Wondering because the .*$ at the end literally does nothing in this case except make the regex run slower

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the data is readonly and for now I just took the value from Steven. Im still learning myself how this feature works.

Comment on lines +25 to +27
export type IdpSyncPageViewProps = {
oidcConfig: OIDCConfig | undefined;
};
Copy link
Member

Choose a reason for hiding this comment

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

Since this is the only prop right now, do we want to couple the UI so tightly to the shape of the API response? My gut feeling is "no", but I don't know enough about the domain to know if this is going to matter much, especially if we have the mock config defined

Nit: I feel like we could also wrap this type in the Readonly utility type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually don't know yet what the API response will look like. All I know is that it will have some similarity to what exists in OIDCConfig. So right now this is just meant to be an approximation to mock some data with the assumption that it will change.

Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

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

Since @aslilac and @Parkreiner are reviewing this as well I just did some QA and it looks ok considering the scope of this PR 👍

@jaaydenh jaaydenh force-pushed the jaaydenh/idp-sync-skeleton branch from f6f18ce to 1523025 Compare September 5, 2024 23:08
@jaaydenh jaaydenh merged commit 6b9e1d4 into main Sep 6, 2024
27 checks passed
@jaaydenh jaaydenh deleted the jaaydenh/idp-sync-skeleton branch September 6, 2024 19:30
@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI: Create skeleton page for IDP sync
4 participants