Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom schema are not executing #227

Open
joshuacox opened this issue Jan 16, 2025 · 4 comments
Open

custom schema are not executing #227

joshuacox opened this issue Jan 16, 2025 · 4 comments

Comments

@joshuacox
Copy link

Using these example values my custom schema are not executing.

Logs

hmm the previous hint did not work:

kl -n example openldap-example-0 --previous  
Defaulted container "openldap-stack-ha" out of: openldap-stack-ha, init-tls-secret (init)
Error from server (BadRequest): previous terminated container "openldap-stack-ha" in pod "openldap-example-0" not found

full logs of the current container are here

To Reproduce
Steps to reproduce the behavior:

  1. Use following values :
    example values

Something like this to port forward to the cluster:

kubectl port-forward -n example svc/openldap-example 1389:389
Forwarding from 127.0.0.1:1389 -> 1389
Forwarding from [::1]:1389 -> 1389
Handling connection for 1389

But this produces nothing:

ldapsearch -H ldap://localhost:1389 -x -s base -b "cn=subschema" objectclasses|grep -C5 -i ssh

However, if I uncomment this line in the values:

 # LDAP_CUSTOM_SCHEMA_DIR: "/opt/bitnami/openldap/etc/schema"

Then I get:

ldapsearch -H ldap://localhost:1389 -x -s base -b "cn=subschema" objectclasses|grep -C5 -i ssh
objectClasses: ( 1.3.6.1.1.1.2.11 NAME 'ieee802Device' DESC 'A device with a M
 AC address' SUP top AUXILIARY MAY macAddress )
objectClasses: ( 1.3.6.1.1.1.2.12 NAME 'bootableDevice' DESC 'A device with bo
 ot parameters' SUP top AUXILIARY MAY ( bootFile $ bootParameter ) )
objectClasses: ( 1.3.6.1.4.1.24552.500.1.1.2.0 NAME 'ldapPublicKey' DESC 'MAND
 ATORY: OpenSSH LPK objectclass' SUP top AUXILIARY MUST ( sshPublicKey $ uid )
  )
objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.10 NAME 'corbaContainer' DESC 'Contai
 ner for a CORBA object' SUP top STRUCTURAL MUST cn )
objectClasses: ( 1.3.6.1.4.1.42.2.27.4.2.9 NAME 'corbaObject' DESC 'CORBA obje
 ct representation' SUP top ABSTRACT MAY ( corbaRepositoryId $ description ) )

But then when logging into phpldapadmin I get:

Array
(
    [class] => N/A
    [function] => debug_dump
    [file] => /var/www/phpldapadmin/lib/functions.php
    [line] => 723
    [debug] => Array
        (
            [Incoming MSG] => Array
                (
                    [title] => Could not start TLS. (openldap-example.example)
                    [body] => Error: Could not start TLS. Please check your LDAP server configuration.
                    [type] => error
                )

            [existing] => Array
                (
                    [0] => Array
                        (
                            [title] => Could not start TLS. (openldap-example.example)
                            [body] => Error: Could not start TLS. Please check your LDAP server configuration.
                            [type] => error
                        )

                    [1] => Array
                        (
                            [title] => Authenticate to server
                            [body] => Successfully logged into server.
                            [type] => info
                        )

                )

        )

)

Expected behavior

The custom schemas to be added and phpldapadmin to continue to work.

@jp-gouin
Copy link
Owner

Hi @joshuacox ,

I don’t have this line in the default values see:

Also I noticed that you are defining admin password in the env section. You should only use the global section

I suggest you use the default and only use the necessary env variable

@joshuacox
Copy link
Author

joshuacox commented Jan 17, 2025

@jp-gouin my env: is on line 27 here

I just removed the admin stuff in the env section as you requested and paired it down significantly. However, the admin user has been functioning without issue, it is the schema's I'm having issues with.

EDIT: after rebuilding I still don't have the additional sshpublickey schema:

ldapsearch -H ldap://localhost:1389 -x -s base -b "cn=subschema" objectclasses|grep -C5 -i ssh

@joshuacox
Copy link
Author

@jp-gouin any idea why the schema does not run?

@jp-gouin
Copy link
Owner

jp-gouin commented Feb 8, 2025

Hi @joshuacox , sorry I don't know why. I've checked and Phpldapadmin works fine with the default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants