fix startup with ocis init
This commit is contained in:
@@ -64,7 +64,7 @@ type LDAPProvider struct {
|
|||||||
CACert string `env:"LDAP_CACERT;AUTH_BASIC_LDAP_CACERT"`
|
CACert string `env:"LDAP_CACERT;AUTH_BASIC_LDAP_CACERT"`
|
||||||
Insecure bool `env:"LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE"`
|
Insecure bool `env:"LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE"`
|
||||||
BindDN string `env:"LDAP_BIND_DN;AUTH_BASIC_LDAP_BIND_DN"`
|
BindDN string `env:"LDAP_BIND_DN;AUTH_BASIC_LDAP_BIND_DN"`
|
||||||
BindPassword string `env:"LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD"`
|
BindPassword string `yaml:"bind_password" env:"LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD"`
|
||||||
UserBaseDN string `env:"LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN"`
|
UserBaseDN string `env:"LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN"`
|
||||||
GroupBaseDN string `env:"LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN"`
|
GroupBaseDN string `env:"LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN"`
|
||||||
UserScope string `env:"LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE"`
|
UserScope string `env:"LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE"`
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ type LDAPDriver struct {
|
|||||||
CACert string `env:"LDAP_CACERT;GROUPS_LDAP_CACERT"`
|
CACert string `env:"LDAP_CACERT;GROUPS_LDAP_CACERT"`
|
||||||
Insecure bool `env:"LDAP_INSECURE;GROUPS_LDAP_INSECURE"`
|
Insecure bool `env:"LDAP_INSECURE;GROUPS_LDAP_INSECURE"`
|
||||||
BindDN string `env:"LDAP_BIND_DN;GROUPS_LDAP_BIND_DN"`
|
BindDN string `env:"LDAP_BIND_DN;GROUPS_LDAP_BIND_DN"`
|
||||||
BindPassword string `env:"LDAP_BIND_PASSWORD;GROUPS_LDAP_BIND_PASSWORD"`
|
BindPassword string `yaml:"bind_password" env:"LDAP_BIND_PASSWORD;GROUPS_LDAP_BIND_PASSWORD"`
|
||||||
UserBaseDN string `env:"LDAP_USER_BASE_DN;GROUPS_LDAP_USER_BASE_DN"`
|
UserBaseDN string `env:"LDAP_USER_BASE_DN;GROUPS_LDAP_USER_BASE_DN"`
|
||||||
GroupBaseDN string `env:"LDAP_GROUP_BASE_DN;GROUPS_LDAP_GROUP_BASE_DN"`
|
GroupBaseDN string `env:"LDAP_GROUP_BASE_DN;GROUPS_LDAP_GROUP_BASE_DN"`
|
||||||
UserScope string `env:"LDAP_USER_SCOPE;GROUPS_LDAP_USER_SCOPE"`
|
UserScope string `env:"LDAP_USER_SCOPE;GROUPS_LDAP_USER_SCOPE"`
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ func DefaultConfig() *config.Config {
|
|||||||
URI: "ldaps://localhost:9235",
|
URI: "ldaps://localhost:9235",
|
||||||
TLSCACert: path.Join(defaults.BaseDataPath(), "idm", "ldap.crt"),
|
TLSCACert: path.Join(defaults.BaseDataPath(), "idm", "ldap.crt"),
|
||||||
BindDN: "uid=idp,ou=sysusers,o=libregraph-idm",
|
BindDN: "uid=idp,ou=sysusers,o=libregraph-idm",
|
||||||
BindPassword: "idp",
|
BindPassword: "",
|
||||||
BaseDN: "ou=users,o=libregraph-idm",
|
BaseDN: "ou=users,o=libregraph-idm",
|
||||||
Scope: "sub",
|
Scope: "sub",
|
||||||
LoginAttribute: "uid",
|
LoginAttribute: "uid",
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ type LDAPDriver struct {
|
|||||||
CACert string `env:"LDAP_CACERT;USERS_LDAP_CACERT"`
|
CACert string `env:"LDAP_CACERT;USERS_LDAP_CACERT"`
|
||||||
Insecure bool `env:"LDAP_INSECURE;USERS_LDAP_INSECURE"`
|
Insecure bool `env:"LDAP_INSECURE;USERS_LDAP_INSECURE"`
|
||||||
BindDN string `env:"LDAP_BIND_DN;USERS_LDAP_BIND_DN"`
|
BindDN string `env:"LDAP_BIND_DN;USERS_LDAP_BIND_DN"`
|
||||||
BindPassword string `env:"LDAP_BIND_PASSWORD;USERS_LDAP_BIND_PASSWORD"`
|
BindPassword string `yaml:"bind_password" env:"LDAP_BIND_PASSWORD;USERS_LDAP_BIND_PASSWORD"`
|
||||||
UserBaseDN string `env:"LDAP_USER_BASE_DN;USERS_LDAP_USER_BASE_DN"`
|
UserBaseDN string `env:"LDAP_USER_BASE_DN;USERS_LDAP_USER_BASE_DN"`
|
||||||
GroupBaseDN string `env:"LDAP_GROUP_BASE_DN;USERS_LDAP_GROUP_BASE_DN"`
|
GroupBaseDN string `env:"LDAP_GROUP_BASE_DN;USERS_LDAP_GROUP_BASE_DN"`
|
||||||
UserScope string `env:"LDAP_USER_SCOPE;USERS_LDAP_USER_SCOPE"`
|
UserScope string `env:"LDAP_USER_SCOPE;USERS_LDAP_USER_SCOPE"`
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ type DataProviderInsecureSettings struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type LdapSettings struct {
|
type LdapSettings struct {
|
||||||
Bindpassword string
|
Bind_password string
|
||||||
}
|
}
|
||||||
type LdapBasedExtension struct {
|
type LdapBasedExtension struct {
|
||||||
Ldap LdapSettings
|
Ldap LdapSettings
|
||||||
@@ -193,34 +193,34 @@ func CreateConfig(insecure, forceOverwrite bool, configPath string) error {
|
|||||||
},
|
},
|
||||||
Idp: LdapBasedExtension{
|
Idp: LdapBasedExtension{
|
||||||
Ldap: LdapSettings{
|
Ldap: LdapSettings{
|
||||||
Bindpassword: idpServicePassword,
|
Bind_password: idpServicePassword,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Auth_basic: AuthbasicExtension{
|
Auth_basic: AuthbasicExtension{
|
||||||
Auth_providers: LdapBasedExtension{
|
Auth_providers: LdapBasedExtension{
|
||||||
Ldap: LdapSettings{
|
Ldap: LdapSettings{
|
||||||
Bindpassword: revaServicePassword,
|
Bind_password: revaServicePassword,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Group: UserAndGroupExtension{
|
Group: UserAndGroupExtension{
|
||||||
Drivers: LdapBasedExtension{
|
Drivers: LdapBasedExtension{
|
||||||
Ldap: LdapSettings{
|
Ldap: LdapSettings{
|
||||||
Bindpassword: revaServicePassword,
|
Bind_password: revaServicePassword,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
User: UserAndGroupExtension{
|
User: UserAndGroupExtension{
|
||||||
Drivers: LdapBasedExtension{
|
Drivers: LdapBasedExtension{
|
||||||
Ldap: LdapSettings{
|
Ldap: LdapSettings{
|
||||||
Bindpassword: revaServicePassword,
|
Bind_password: revaServicePassword,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Graph: GraphExtension{
|
Graph: GraphExtension{
|
||||||
Identity: LdapBasedExtension{
|
Identity: LdapBasedExtension{
|
||||||
Ldap: LdapSettings{
|
Ldap: LdapSettings{
|
||||||
Bindpassword: idmServicePassword,
|
Bind_password: idmServicePassword,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user