osluc

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: GPL-3.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

OSLUC

OpenShift LDAP Users Cleaner

What is it

OSLUC does following:

  • Gets a list of all OpenShift users (equivalent of oc get users -o yaml) using in-kubernetes or KUBECONFIG variable provided credentials
  • Binds to LDAP service by using configuration sourced from LDAPSyncConfig compatible YAML file.
    • File needs to be mounted inside the container, path to it is configured using OSLUC_LDAP_SYNC_CONFIG_PATH environmental variable
  • Traverses subset of users from the list
    • Checks if user contains idenitities list with one and only entry prefixed with LDAP provider name. Prefix value is read from OSLUC_USER_IDENTITY_PREFIX environmental variable.
    • Searches LDAP for the presence and status of the user
    • If user is deactivated or not found, removes User and Identity resource - when OSLUC_CONFIRM is set to TRUE otherwise, it is a dry run

How to run

  • Create a CronJob
    • use this image
    • mount ConfigMap containing LDAPSyncConfig
    • mount Secret containing LDAP bind credentials
    • use separate service account
    • give service account permissions to use verbs delete,get,list on User.user.openshift.io/v1 and Identity.user.openshift.io/v1
  • Set environmental variables as per description in environment.md file

TODO

  • better way to read LDAPSyncConfig
  • more tests

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址