I am pleased to announce that version 1.00 of mod_waklog is now available to download.
mod_waklog is an Apache module that provides aklog-like semantics for the web. mod_waklog will acquire (and store in the kernel) an AFS credential when a connection is opened, use the credential for the duration of the connection, and will remove the credential when the connection is closed.
This release adds support for Apache2, a shared token cache, per-<Location> principals, and many other improvements.
Please note that the names of some of the configuration directives have changed in this release. See the README for the new names.
[Quelle: Adam via openafs-annouce]
Unter mod_waklog muß man sich das Backend hinter Filedrawers vorstellen, also die Schnittstelle zwischen dem Apache und dem Kerberos-Realm.
mod_waklog is developed in C. mod_waklog acquires AFS credentials of the logged in user and allows Apache to run as that user.
[Quelle: modwaklog.org]
VN:F [1.4.6_730]
Rating: 9.5/10 (2 votes cast)
Sebastian AFS, Kerberos
Anmelden am AFS kann man sich auch wunderbar per PAM. Das erspart dem User sowohl kinit als auch aklog.
Auf Debian werden hierfür zwei Pakete benötigt:
/etc/pam.d/common-auth:
auth optional pam_krb5.so forwardable debug
auth sufficient pam_unix.so use_first_pass nullok_secure
auth required pam_deny.so
/etc/pam.d/common-session:
session optional pam_krb5.so debug
session optional pam_openafs_session.so
session required pam_unix.so
Damit das auch über SSH funktioniert, noch eine kleine Änderung an der SSHd-Config.
/etc/ssh/sshd_config:
ChallengeResponseAuthentication yes
UsePAM yes
Im Falle dieser Beispiel-Config ist es wichtig, daß Kerberos-Passwörter und lokale Unix-Passwörter überein stimmen. Ändern läßt sich das z.B. per LDAP. root kann sich immer anmelden, selbst wenn das KDC nicht erreichbar ist.
Das Keyword “debug” kann entfernt werden, sobald per /var/log/authlog geklärt ist, daß der Login funktioniert.
VN:F [1.4.6_730]
Rating: 8.5/10 (2 votes cast)
Sebastian AFS, Kerberos
Das Nachfolgende funktioniert auf Debian-Systemen. Es läßt sich aber recht leicht auf andere Betriebssysteme “portieren”, da es keine Debian-Spezifische Funktionalität ist.
SSH Public-Keys sind toll. Kerberos ist besser!
Kerberos-Tickets kann man für SSH-Verbindungen nutzen, in etwa bildet man damit das Verhalten von SSH Public-Keys nach. Es kann allerdings mehr.
Was braucht man?
Einen Kerberos-Principal für den Benutzer und einen Principal für den Host. Den Key für den Host legt man mit einem random-Passwort an und exportiert ihn anschließend noch.
kadmin: ank user
kadmin: ank -randkey host/maschine
kadmin: ktadd -k /tmp/maschine.keytab host/maschine
Auf einem sicheren Weg nun die exportierte Datei auf den SSH-Server in /etc/krb5.keytab kopieren oder besser gleich verschieben.
Änderung am SSHd
Endweder man verwendet direkt das Paket ssh-krb5 oder man passt en existierenden SSHd etwas an.
/etc/ssh/sshd_config:
# Kerberos options
KerberosAuthentication yes
KerberosOrLocalPasswd yes
KerberosTicketCleanup yes
# GSSAPI options
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
Kerberos Client auf dem Server
Das Paket krb5-user muß installiert sein.
/etc/krb5.conf:
[libdefaults]
default_realm = REALM
[realms]
REALM = {
kdc = kdc-master:88
kdc = kdc-slave:88
admin_server = kdc-master:749
default_domain = domain
}
[domain_realm]
.domain = REALM
domain = REALM
Das war’s fast schon.
Der User
Im Home-Verzeichnis des Users die .k5login erzeugen und mit den Principals die sich anmelden dürfen füllen.
user@REALM
nocheinuser@REALM
Pro Zeile einen Principal.
That’s it.
VN:F [1.4.6_730]
Rating: 6.0/10 (2 votes cast)
Sebastian Kerberos, Tips und Tricks, debian