Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

perf(auth/ldap): Use group to user mapping to role sync#573

Merged
mergify[bot] merged 7 commits intospinnaker:masterfrom
kowshikRoy:fiat-ldap-role-sync
Apr 3, 2020
Merged

perf(auth/ldap): Use group to user mapping to role sync#573
mergify[bot] merged 7 commits intospinnaker:masterfrom
kowshikRoy:fiat-ldap-role-sync

Conversation

@kowshikRoy
Copy link
Copy Markdown
Contributor

@kowshikRoy kowshikRoy commented Mar 4, 2020

Currently fiat sync LDAP roles by each users synchronously by making API call
to LDAP server. As the number of users grow, this could cause performace
issue.
Ldap server maintains the Group -> User mapping denoting which users are
the part of particular group. So, instead of fetching roles for each users,
we can fetch the whole Group->User mapping in one API call and perform
the role sync.

Trade-off:

  • As the response of LDAP will huge compared to previous approach.
    This could put load on network
  • For small users, the previous approach could be faster. That's why we
    encourage people to define a threshold after which the group call
    should be made.

Performance Improvement: From 16 mins -> 14sec.
Linked issue:spinnaker/spinnaker#5508

Currently fiat sync LDAP roles by each users synchronously by making API call
to LDAP server. As the number of users grow, this could cause performace
issue.
Ldap server maintains the Group -> User mapping denoting which users are
the part of particular group. So, instead of fetching roles for each users,
we can fetch the whole Group->User mapping in one API call and perform
the role sync.

Trade-off:
* As the response of LDAP will huge compared to previous approach.
  This could put load on network
* For small groups, the previous approach could be faster. That's why we
  encourage people to define a threshold after which the group call
  should be made.
Comment thread fiat-ldap/src/main/java/com/netflix/spinnaker/fiat/config/LdapConfig.java Outdated
Comment thread fiat-ldap/src/main/java/com/netflix/spinnaker/fiat/config/LdapConfig.java Outdated
@kowshikRoy kowshikRoy changed the title perf(auth/ldap): Use group to user mapping to role sync WIP: perf(auth/ldap): Use group to user mapping to role sync Mar 4, 2020
@kowshikRoy kowshikRoy changed the title WIP: perf(auth/ldap): Use group to user mapping to role sync perf(auth/ldap): Use group to user mapping to role sync Mar 4, 2020
@kowshikRoy
Copy link
Copy Markdown
Contributor Author

@robzienert @ajordens @cfieber
Please review this changes.

@cfieber
Copy link
Copy Markdown
Contributor

cfieber commented Mar 26, 2020

this looks fine, but I'd like to see a test that exercises this behaviour in LdapUserRolesProviderSpec?

@kowshikRoy kowshikRoy requested a review from jonsie as a code owner March 27, 2020 21:05
Repon Kumar Roy added 2 commits March 28, 2020 03:07
@kowshikRoy
Copy link
Copy Markdown
Contributor Author

@cfieber added tests. Thanks.
Also, working on adding support for configuration in halyard

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants