Coder Social home page Coder Social logo

cruise-automation / rbacsync Goto Github PK

View Code? Open in Web Editor NEW
236.0 13.0 33.0 4.48 MB

Automatically sync groups into Kubernetes RBAC

License: Apache License 2.0

Dockerfile 0.89% Makefile 2.00% Go 96.08% Shell 1.03%
go golang kubernetes-operator kubernetes kubernetes-controller k8s kubernetes-rbac

rbacsync's People

Contributors

cxuu avatar cyril-sabourault avatar davidxia avatar dependabot[bot] avatar dustin-decker avatar jonnylangefeld avatar mattlandis avatar mattnworb avatar max0ne avatar rca0 avatar sbunce avatar stevvooe avatar technologik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rbacsync's Issues

RBACSync should not remove rolebindings when G Suite API fails

Current Behavior:

When controller fails to obtain group members from group.Grouper due an error (e.g G Suite is down or unreachable), it will remove all associated rolebindings from all namespaces. Relevant line is

This failure mode was also observed in the wild.

Expected Behavior:

G Suite API errors should NOT cause removal of rolebindings that already exist for the members. They should only be removed if we can positively confirm the member is no longer in the group. Otherwise this may cause production outages when G Suite API suddenly becomes unavailable due to misconfiguration/connectivity issue/etc.

@stevvooe raised the concern that this may prevent self-healing in case attacker somehow escalates their privileges and creates an "out-of-band" rolebinding. Then they can disable G Suite API and prevent RBACSync from restoring order. I'd argue that we should tradeoff potentially heightened security for reliability because:

  • DoS attack is still a valid security concern. Currently an attacker might break G Suite connection and will cause an entire cluster's user base to lose access. The blast radius is potentially huge on this one.
  • We can quite easily mitigate the scenario described above by auditing/alerting for "out-of-band" bindings and also alerting on G Suite unavailability.
  • Even leaving things as-is, this "vulnerability" still exists because attacker may just repeatedly re-create malicious rolebinding in-between RBACSync re-sync intervals.

Proposed Solution:

Only evict rolebindings when we can positively confirm the associated members aren't in the group members list anymore (by issuing successful API call and examining membership list). Export Prometheus metrics for G Suite errors.

Accounts setup documentation

Hi,

Unfortunately I wasn't able to set this up. Since the whole GSuite delegation account and GCP service account and thier permission are quite complex to setup, some screenshots might be helpful. I know it's a very young project but it may raise adoption and people may be willing to maintain documention as well.

Hence, the linked Fin.com is not accessible outside the US but Google cache has it archived (not sure how long)

https://webcache.googleusercontent.com/search?q=cache:Q5VZUOE3cNgJ:https://www.fin.com/post/2017/10/navigating-google-suite-directory-api+&cd=1&hl=en&ct=clnk&gl=de

Cheers,
Peter

Improve status reporting of RBACSync

While we do provide events and detailed logs of actions surrounding RBACSync, it might be good to improve the audit logging with mind of understanding the complete operation of all configurations used by rbacsync.

This may be solved with software improvements, through better status reporting or through better debugging and auditing documentation.

Update CRDs with schema validation and remove deprecated APIs

Hey, I was trying out this project and had to make some changes to remove all the deprecation warnings and get it to working on k8s version 1.20

Changes I made:

  • Updated CRDs with OpenAPIV3 schema validation
  • Updated CRD API
  • Update RoleBindings API

I am not sure whether this project is actively being maintained or not, but if you are interested I can open a PR with the updated manifests.

Google Groups API thresholds/quotas exceeded by RBACSync querying

Hi, we (Spotify) are currently using RBACSync on each GKE/K8s cluster that we run (over 30 clusters). The aggregate querying of all these RBACSync instances frequently hit the limits for the Google Groups API.

We understand that there are many different configuration options that can change the RBACSync query behavior/frequency of the Google Groups API querying. However, these configuration options aren't able to mitigate the large amount of querying done by RBACSync when you have a lot of Kubernetes clusters running that each have a copy of RBACSync running on them. The problem is especially exacerbated when a new version of RBACSync is deployed as the RBACSync workloads on each cluster will restart/be updated at once and result in a lot of simultaneous querying.

We're curious if there's anything that's recommended for this case to avoid the aggregate of these RBACSync instances exceeding the Google Groups API. We're curious how Cruise/other RBACSync users are running, operating, and deploying RBACSync and if anyone else is encountering these kinds of issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.