This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dn: olcDatabase={1}ldap,cn=config | |
objectClass: olcDatabaseConfig | |
objectClass: olcLdapConfig | |
olcDatabase: {1}ldap | |
olcSuffix: dc=example,dc=org | |
olcRootDN: cn=ldap-admin | |
olcAccess: {0}to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external | |
,cn=auth manage by * break | |
olcAccess: {1}to * by * read | |
olcDbStartTLS: start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dn: cn=config | |
changetype: modify | |
replace: olcAuthzPolicy | |
olcAuthzPolicy: to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dn: cn=proxy,ou=agents,dc=example,dc=org | |
objectClass: simpleSecurityObject | |
objectClass: organizationalRole | |
cn: proxy | |
description: principal for proxy ldap | |
userPassword: {SSHA}LCLFm/lhsZqr4ltuGoyrr/zKGZgJSZ3c | |
authzTo: {0}dn.regex:^uid=[^,]*,ou=people,dc=example,dc=org$ | |
authzTo: {1}dn.regex:^cn=[^,]*,ou=agents,dc=example,dc=org$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dn: olcDatabase={2}ldap,cn=config | |
changetype: modify | |
replace: olcDbIDAssertAuthzFrom | |
olcDbIDAssertAuthzFrom: "dn:*" | |
- | |
replace: olcDbIDAssertBind | |
olcDbIDAssertBind: mode=self bindmethod=simple binddn="cn=proxy,ou=agents,dc=example,dc=org" credentials=KHg7VvVD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 fd=19 ACCEPT from PATH=/var/run/slapd/ldapi (PATH=/var/run/slapd/ldapi) | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=0 SRCH base="" scope=0 deref=0 filter="(objectClass=*)" | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=0 SRCH attr=supportedSASLMechanisms | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=0 ENTRY dn="" | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=0 SEARCH RESULT tag=101 err=0 nentries=1 text= | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=1 BIND dn="" method=163 | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=1 RESULT tag=97 err=14 text=SASL(0): successful result: security flags do not match required | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=2 BIND dn="" method=163 | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=2 RESULT tag=97 err=14 text=SASL(0): successful result: security flags do not match required | |
Aug 1 10:36:59 proxy slapd[23946]: conn=1057 op=3 BIND dn="" method=163 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 fd=22 ACCEPT from IP=10.0.0.1:43682 (IP=0.0.0.0:389) | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=0 EXT oid=1.3.6.1.4.1.1466.20037 | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=0 STARTTLS | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=0 RESULT oid= err=0 text= | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 fd=22 TLS established tls_ssf=128 ssf=128 | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=1 BIND dn="cn=proxy,ou=agents,dc=example,dc=org" method=128 | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=1 BIND dn="cn=proxy,ou=agents,dc=example,dc=org" mech=SIMPLE ssf=0 | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=1 RESULT tag=97 err=0 text= | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=2 PROXYAUTHZ dn="uid=a_user,ou=people,dc=example,dc=org" | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=2 SRCH base="dc=example,dc=org" scope=2 deref=0 filter="(uid=a_user)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 fd=22 ACCEPT from IP=10.0.0.1:43682 (IP=0.0.0.0:389) | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=0 EXT oid=1.3.6.1.4.1.1466.20037 | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=0 STARTTLS | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=0 RESULT oid= err=0 text= | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 fd=22 TLS established tls_ssf=128 ssf=128 | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=1 BIND dn="cn=proxy,ou=agents,dc=example,dc=org" method=128 | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=1 BIND dn="cn=proxy,ou=agents,dc=example,dc=org" mech=SIMPLE ssf=0 | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=1 RESULT tag=97 err=0 text= | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=2 PROXYAUTHZ dn="uid=a_user,ou=people,dc=example,dc=org" | |
Aug 1 10:36:44 openldap slapd[19002]: conn=1662 op=2 SRCH base="dc=example,dc=org" scope=2 deref=0 filter="(uid=a_user)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def not-italian-chars #{\J \K \X \Y \W}) | |
(def the-chars (cycle (clojure.set/difference (set (range (int \A) (+ (int \Z) 1))) (map int not-italian-chars)))) | |
(def the-chars (cycle (filter #(not ((set (map int not-italian-chars)) %)) (range (int \A) (+ (int \Z) 1))))) | |
(def char-with-index (reduce #(assoc %1 %2 (count %1)) {} (take 21 the-chars))) | |
(defn alpha [offset] (take 21 (drop (char-with-index (int offset)) the-chars))) | |
(map #(apply str (vec (map char %&))) (alpha \S) (alpha \P) (alpha \A) (alpha \D) (alpha \E)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import '(org.ldaptive.io LdifWriter)) | |
(import '(java.io StringWriter)) | |
(import '(org.ldaptive LdapEntry LdapAttribute SortBehavior)) | |
(def attr1 (LdapAttribute/createLdapAttribute SortBehavior/UNORDERED | |
"mail" | |
["francesco.mlvz@gmail.com" "francesco.malvezzi@unimore.it"] | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Strategy | |
include Comparable | |
attr :strategy | |
def initialize(strategy) | |
# @@order should read: r eats s eats p eats r | |
@@order ="rspr" | |
raise NoSuchStrategyError, "Strategy must be one of R,P,S" unless %w{R P S r p s}.include? strategy | |
@strategy = strategy.downcase | |
end |