Giter Site home page Giter Site logo

arjunrn / cluster-authentication-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift/cluster-authentication-operator

0.0 2.0 0.0 60.48 MB

OpenShift operator for the top level Authentication and OAuth configs.

License: Apache License 2.0

Makefile 0.25% Go 99.75%

cluster-authentication-operator's Introduction

cluster-authentication-operator

The authentication operator is an OpenShift ClusterOperator.
It installs and maintains the Authentication Custom Resource in a cluster and can be viewed with:

oc get clusteroperator authentication -o yaml

The Custom Resource Definition authentications.operator.openshift.io
can be viewed in a cluster with:

$ oc get crd authentications.operator.openshift.io -o yaml

Many OpenShift ClusterOperators share common build, test, deployment, and update methods.
For more information about how to build, deploy, test, update, and develop OpenShift ClusterOperators, see
OpenShift ClusterOperator and Operand Developer Document

This section explains how to deploy OpenShift with your test cluster-authentication-operator image:
Testing a ClusterOperator/Operand image in a cluster

Add a basic IdP to test your stuff

The most common identity provider for demoing and testing is the HTPasswd IdP.

To set it up, take the following steps:

  1. Create a new htpasswd file
$ htpasswd -bBc /tmp/htpasswd testuser testpasswd
  1. (optional) Add more users
$ htpasswd -bB /tmp/htpasswd testuser2 differentpassword
  1. Create a secret from that htpasswd in the openshift-config namespace
oc create secret generic myhtpasswdidp-secret -n openshift-config --from-file=/tmp/htpasswd
  1. Configure the OAuth server to use the HTPasswd IdP from the secret by editing the spec of the cluster-wide OAuth/cluster object so that it looks like the one in this example:
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
  - name: htpassidp
    type: HTPasswd
    htpasswd:
      fileData:
        name: myhtpasswdidp-secret
  1. The operator will now restart the OAuth server deployment and mount the new config
  2. When the operator is available again (oc get clusteroperator authentication), you should be able to log in:
oc login -u testuser -p testpasswd

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.