Git Product home page Git Product logo

component-openshift4-authentication's Introduction

Commodore Component: OpenShift 4 Authentication

This is a Commodore Component for OpenShift 4 Authentication.

This repository is part of Project Syn. For documentation on Project Syn and this component, see syn.tools.

Documentation

The rendered documentation for this component is available on the Commodore Components Hub.

Documentation for this component is written using Asciidoc and Antora. It can be found in the docs folder. We use the Divio documentation structure to organize our documentation.

Run the make docs-serve command in the root of the project, and then browse to http://localhost:2020 to see a preview of the current state of the documentation.

After writing the documentation, please use the make docs-vale command and correct any warnings raised by the tool.

Contributing and license

This library is licensed under BSD-3-Clause. For information about how to contribute, see CONTRIBUTING.

component-openshift4-authentication's People

Contributors

bastjan avatar ccremer avatar corvus-ch avatar debakelorakel avatar glrf avatar haasad avatar mhutter avatar renovate-bot avatar simu avatar srueg avatar thebiglee avatar tobru avatar

Stargazers

 avatar

Watchers

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

component-openshift4-authentication's Issues

Randomize cron schedule

Having one cluster doing stuff every five minutes is OK. Having hundreds of clusters doing the same thing every five minutes can become an issue if that thing is contacting one and the same remote system (like it is the case with the LDAP sync). Also having hundreds of things on one cluster running in the same intervals results in CPU usage spikes.

Add support to configure multiple sudoers groups

Context

For APPUiO Managed we grant some customer users "admin" rights on the clusters. These rights ideally are identical to the ones granted to the sudoers group via this component. Currently we do this with adhoc configs.

But manually maintaining adhoc configs misses changes like #42 and #61 .

By having an option to add additional sudoers groups, this could be managed via this component.

Alternatives

Keep doing it with adhoc-configs

Do not use `cluster-admin` for LDAP group sync

The implementation in #1 uses the role cluster-admin to give permission for the LDAP group sync. This is probably too much power.

Find the minimal required permission and use them instead of role clsuter-admin.

Manage User Groups

Context

In #1 we implemented LDAP group sync. Since we'll move away from LDAP as authentication provider (to OIDC) we'll need another way to manage the groups.
Implement the feature in this component to manage user groups:
It should be possible to assign a list of usernames to a certain group. For example all VSHN users can be mapped to the "VSHN openshiftroot" group that way. Additionally this allows also customers to introduce groups of their own users.

Alternatives

Using LDAP group sync is currently the only option to manage user groups in OpenShift.

Acceptance Criteria

  • Given a hierarchy, when defining the group memberships in the tenant level (or higher up), then the RBAC groups are created for all clusters that are part of the hierarchy.
  • Given a defined group memberships in a hierarchy, when a specific user is removed/nullified from a group on a more specific level (e.g. cluster), then the specific user is not in the RBAC group.
  • Given a defined group memberships in a hierarchy, when an additional user is added to a group, then the RBAC group includes the given user.
  • Given a defined group memberships in a hierarchy, when the group is removed/nullified in lower level of the hierarchy, then the RBAC group will not be created

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

This repository currently has no open or pending branches.


  • Check this box to trigger a request for Renovate to run again on this repository

More View Permissions for Admin Users

Steps to Reproduce the Problem

  1. Login to cluster
  2. oc describe node c-mist-sg7hn-m-0.europe-west6-a.c.ocp4-poc.internal

Actual Behavior

The request fails with Error from server (Forbidden): nodes "c-mist-sg7hn-m-0.europe-west6-a.c.ocp4-poc.internal" is forbidden: User "simon.ruegg" cannot get resource "nodes" in API group "" at the cluster scope

Expected Behavior

View right is granted on more resources for operations.
Especially get and list would be helpful on the following resources:

  • nodes
  • machinesets
  • machines
  • machineconfigpools
  • machineconfigs
  • apiservices
  • persistentvolumes
  • podsecuritypolicies
  • syncconfigs
  • ingresscontroller
  • ...
    (To be extended)

For each of these resources we have to first double check if it's ok to make them viewable without compromising security.

Make LDAP CA configuration optional

Summary

As an engineer running an LDAP server secured by a certificate signed by a public CA
I want to be able to change the certificate for the LDAP server without having to touch the LDAP IdP config on all OCP4 clusters
So that certificate changes are as painless as possible.

Context

Currently, to configure and LDAP identity provider, users must provide the LDAP server's CA certificate. This is used for both the OpenShift authentication config and the LDAP group sync cronjob.

However, the OpenShift authentication setup works fine without providing the LDAP server's CA certificate, if the server uses a certificate signed by a CA which is part of OpenShift's trusted system CA bundle. However, to ensure the openshift authentication uses the system CA bundle, we need to ensure that we don't configure the LDAP IdP ca field, as otherwise the oauth pods use the contents of that field instead of the system CA bundle.

The OCP trusted CA bundle can be made available by creating an empty configmap with the label config.openshift.io/inject-trusted-cabundle="true".

Out of Scope

โ€”

Further links

Acceptance criteria

  • Given that I configure an LDAP IdP for an LDAP server which uses a certificate signed by a public CA, I don't have to provide the CA certificate in the component configuration, and the resulting configuration instead uses the OpenShift system trusted CA bundle.
  • Given that I don't configure a custom CA certificate for an LDAP IdP, the resulting oauth config for that LDAP IdP doesn't contain the ca field.
  • Given that I don't configure a custom CA certificate for an LDAP IdP, the group sync cronjob for that LDAP IdP uses the system trusted CA bundle to verify the LDAP server's certificate

Implementation Ideas

  • Adjust code in component/ldap.jsonnet to create a configmap with label config.openshift.io/inject-trusted-cabundle="true" to get a configmap containing the OCP4 system CA bundle for the group sync cronjob and make sure the cronjob is using that configmap when no custom CA is provided for the LDAP server. Make sure ArgoCD doesn't complain about the changing contents of the system CA bundle configmap.
  • Ensure that the LDAP IdP entry in the oauth object doesn't have the ca key, if no custom CA is provided.

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.