Skip to content

Very simple kerberos workstation container designed to run as a sidecar and provide an app with krb token. K8S version

Notifications You must be signed in to change notification settings

maxbatur/kinit-sidecar-k8s

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kinit-sidecar-k8s

This is vanilla kubernetes version of kinit-sidecar. Migrated kinit-sidecar from OpenShift/CentOS to K8S/Alpine

How to run

$ git clone https://github.com/maxbatur/kinit-sidecar-k8s.git
$ cd kinit-sidecar-k8s
$ ./build-images.sh
$ cd k8s
$ ./demo-auth-k8s.sh

How it works

demo-auth-k8s.sh - script creates two pods with two containers in each of them. First pod is KDC server (kdc container) and KAdmin server (kadmin container). Second pod has two containers:

  1. kinit-sidecar container receives keytab from kdc and creates kerberos ticket cache from it that is shared with example-app container via shared memory store (/dev/shm).
  2. example-app runs client app that is actually a simple sh script that shows shared cached kerberos tickets with klist. That is, if you have valid ticket cache you've been authenticated and will see valid kerberos tickets.
*** checking if authenticated
Ticket cache: FILE:/dev/shm/ccache
Default principal: [email protected]

Valid starting     Expires            Service principal
01/21/24 23:27:48  01/22/24 11:27:48  krbtgt/[email protected]
        renew until 01/22/24 23:27:48

Sidecar container will refresh tickets at specified interval. See related links for more details.

Related links

About

Very simple kerberos workstation container designed to run as a sidecar and provide an app with krb token. K8S version

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 86.8%
  • Dockerfile 13.2%