Skip to content

Properly check for SAMLIdPServiceProvider access#33190

Merged
avatus merged 2 commits intomasterfrom
avatus/unified_saml_access_check
Oct 11, 2023
Merged

Properly check for SAMLIdPServiceProvider access#33190
avatus merged 2 commits intomasterfrom
avatus/unified_saml_access_check

Conversation

@avatus
Copy link
Copy Markdown
Contributor

@avatus avatus commented Oct 10, 2023

When I added sort indexes to the unified resource cache I consolidated all the access checks because they are all the same... EXCEPT for SAML apps that I forgot about. This means they are excluded from the unified web UI atm. This fix changes it. I updated one of the tests to make sure SAML show up just in case I miss some weird edge case again

Comment thread lib/auth/auth_with_roles_test.go Outdated
Comment thread lib/auth/auth_with_roles.go Outdated
Comment thread lib/auth/auth_with_roles.go Outdated
Comment thread lib/auth/auth_with_roles.go Outdated
Comment thread lib/auth/auth_with_roles_test.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
names := []string{"vivi", "cloud", "aerith", "baret", "cid", "vivi2"}
names := []string{"vivi", "cloud", "aerith", "barret", "cid", "vivi2"}

;)

Comment thread lib/auth/auth_with_roles_test.go Outdated
Comment thread lib/auth/auth_with_roles.go Outdated
Comment thread lib/auth/auth_with_roles.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks like this logging is deferred until the end, wouldn't ListUnifiedResources(%v->%v) be the same? b/c they both refer to the same resources, should it be 0 -> len(unifiedResources)?

Copy link
Copy Markdown
Contributor Author

@avatus avatus Oct 10, 2023

Choose a reason for hiding this comment

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

yeah. i actually don't think we need this anymore anyway. it was left over from when we pulled in every resource and then filtered down. so it was valuable to see how long it took to fetch and filter through all those. I can remove it completely now that we only iterate.
I have a PR in flight that will cause a merge conflict here so when its finished in the merge queue, i'll fix the conflict and clean up this function

@avatus avatus force-pushed the avatus/unified_saml_access_check branch from fed67e0 to b75b242 Compare October 11, 2023 00:02
@avatus avatus enabled auto-merge October 11, 2023 00:03
@avatus avatus added this pull request to the merge queue Oct 11, 2023
Merged via the queue into master with commit cea7a60 Oct 11, 2023
@avatus avatus deleted the avatus/unified_saml_access_check branch October 11, 2023 00:42
avatus added a commit that referenced this pull request Oct 11, 2023
* Properly check for SAMLIdPServiceProvider access

* Remove unneeded debug log
@public-teleport-github-review-bot
Copy link
Copy Markdown

@avatus See the table below for backport results.

Branch Result
branch/v14 Failed

github-merge-queue Bot pushed a commit that referenced this pull request Oct 12, 2023
* Include Pinned Resources in User Preferences (#32009)

* Cherry-pick b905eaf

* Fix merge conflict

* Properly check for SAMLIdPServiceProvider access (#33190)

* Properly check for SAMLIdPServiceProvider access

* Remove unneeded debug log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants