Skip to content

Commit

Permalink
updating config and adding how to kerberos description
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderUngefug committed Dec 18, 2024
1 parent 9ce22d2 commit b4d5cbe
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/kerberos/etc/krb5.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
dns_lookup_realm = false
permitted_enctypes = aes256-cts-hmac-sha384-192 aes128-cts-hmac-sha256-128 aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 camellia256-cts-cmac camellia128-cts-cmac


[realms]
EXAMPLE.COM = {
kdc = dbildungs-iam-server-kdc-1
admin_server = dbildungs-iam-server-kdc-1
}
[realms]
EXAMPLE.COM = {
kdc = dbildungs-iam-server-kdc-1
admin_server = dbildungs-iam-server-kdc-1
}

[domain_realm]
[domain_realm]
.example.com = EXAMPLE.COM
example.com = EXAMPLE.COM
Binary file modified src/kerberos/etc/krb5.keytab
Binary file not shown.
52 changes: 52 additions & 0 deletions src/kerberos/how to kerberos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
create new principal:

HTTP/[email protected]

```
kadmin.local
addprinc HTTP/[email protected]
ktadd -k /etc/krb5.keytab HTTP/[email protected]
```

Export keytab

krb5.conf
```
[libdefaults]
default_realm = EXAMPLE.COM
dns_lookup_kdc = false
dns_lookup_realm = false
permitted_enctypes = aes256-cts-hmac-sha384-192 aes128-cts-hmac-sha256-128 aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 camellia256-cts-cmac camellia128-cts-cmac
[realms]
EXAMPLE.COM = {
kdc = dbildungs-iam-server-kdc-1
admin_server = dbildungs-iam-server-kdc-1
}
[domain_realm]
.example.com = EXAMPLE.COM
example.com = EXAMPLE.COM
```

copy keytab file and krb5.conf file to keycloak image to /etc

set Kerberos Provider with

![[Pasted image 20241217162644.png]]

restart keycloak

create new in Keykloak
create Userprincipal in kerberos server:

```
kadmin.local
addprinc [email protected]
```

Login to Client with activated Kerberos flow

Create Kerberos Token in keycloak with:

kinit <username>

0 comments on commit b4d5cbe

Please sign in to comment.