Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

LDAP not working with Portus 2.3.1 #1746

Closed
lonewulf opened this issue Mar 29, 2018 · 7 comments · Fixed by #1817
Closed

LDAP not working with Portus 2.3.1 #1746

lonewulf opened this issue Mar 29, 2018 · 7 comments · Fixed by #1817
Assignees
Labels

Comments

@lonewulf
Copy link
Contributor

Hi, I'm trying to do a mock upgrade from 2.2.x to 2.3.1 and the ldap bind isn't working anymore:

I get : "translation missing: en.devise.failure.user.ldap_bind_failed"
I double checked the bind dn and bind password in the config and it's correct.

The account ended up locked so I guess there is something wrong with the password not being used correctly to bind the account.

(I've made a tcp dump of the process and can't find the password anywhere in the bind request packet)

Regards,

@lonewulf
Copy link
Contributor Author

lonewulf commented Mar 29, 2018

I compared to a tcpdump of a manual ldapsearch bind, I can see the password in the simple authentication part of the bind request packet, so there is definitely a problem with either Portus ignoring the password in the config file or the ldap library not passing it during the bind...

@lonewulf
Copy link
Contributor Author

Managed to make it work passing it with an environment variable instead of in the config file.

Still, didn't work when configured via config-local.yml

@yongzhang
Copy link

+1, I have the same issue.

@yongzhang
Copy link

@lonewulf How can you pass it by environment variable?

@lonewulf
Copy link
Contributor Author

lonewulf commented Apr 3, 2018

We use docker to run portus so we pass it via an environment file, you have to put the password in the PORTUS_LDAP_AUTHENTICATION_PASSWORD env variable.

@yongzhang
Copy link

@lonewulf It works, thanks. I have one more issue when migrating 2.2 to 2.3, that is, 2.3 requests mysql in utf8 character, but this is not required in 2.2, did you experience this issue?

@lonewulf
Copy link
Contributor Author

lonewulf commented Apr 3, 2018

@hiscal2015 I did, had to convert the database and tables to utf-8, with the right collate type too.

@mssola mssola self-assigned this May 2, 2018
@mssola mssola added the bug label May 2, 2018
mssola added a commit to mssola/Portus that referenced this issue May 10, 2018
This commit fixes a couple of bugs present in both master and 2.3:

1. We didn't implement some options that needed to be passed to the LDAP
   backend to fully support SSL connections. This has been addressed
   also in the configuration, but without breaking existing
   installations (e.g. the `method` attribute from 2.3 has been left
   untouched). This will be addressed in later commits of the master
   branch (so in 2.4 users should adapt to this change).
2. We were relying on Devise's translations for failures, but some of
   them were not available. This has been addressed and improved: the
   error message will be more on point and more informative to end
   users.

There is still room for improvement, but we can do it in later commits:
let's keep this commit to the point so it can be cherry-picked into the
2.3 branch.

Fixes SUSE#1746
Fixes SUSE#1774

bsc#1073232

Signed-off-by: Miquel Sabaté Solà <[email protected]>
mssola added a commit to mssola/Portus that referenced this issue May 11, 2018
This commit fixes a couple of bugs present in both master and 2.3:

1. We didn't implement some options that needed to be passed to the LDAP
   backend to fully support SSL connections. This has been addressed
   also in the configuration, but without breaking existing
   installations (e.g. the `method` attribute from 2.3 has been left
   untouched). This will be addressed in later commits of the master
   branch (so in 2.4 users should adapt to this change).
2. We were relying on Devise's translations for failures, but some of
   them were not available. This has been addressed and improved: the
   error message will be more on point and more informative to end
   users.

There is still room for improvement, but we can do it in later commits:
let's keep this commit to the point so it can be cherry-picked into the
2.3 branch.

Fixes SUSE#1746
Fixes SUSE#1774

bsc#1073232

Signed-off-by: Miquel Sabaté Solà <[email protected]>
mssola added a commit to mssola/Portus that referenced this issue May 11, 2018
This commit fixes a couple of bugs present in both master and 2.3:

1. We didn't implement some options that needed to be passed to the LDAP
   backend to fully support SSL connections. This has been addressed
   also in the configuration, but without breaking existing
   installations (e.g. the `method` attribute from 2.3 has been left
   untouched). This will be addressed in later commits of the master
   branch (so in 2.4 users should adapt to this change).
2. We were relying on Devise's translations for failures, but some of
   them were not available. This has been addressed and improved: the
   error message will be more on point and more informative to end
   users.

There is still room for improvement, but we can do it in later commits:
let's keep this commit to the point so it can be cherry-picked into the
2.3 branch.

Fixes SUSE#1746
Fixes SUSE#1774

bsc#1073232

Signed-off-by: Miquel Sabaté Solà <[email protected]>
mssola added a commit to mssola/Portus that referenced this issue May 11, 2018
This commit fixes a couple of bugs present in both master and 2.3:

1. We didn't implement some options that needed to be passed to the LDAP
   backend to fully support SSL connections. This has been addressed
   also in the configuration, but without breaking existing
   installations (e.g. the `method` attribute from 2.3 has been left
   untouched). This will be addressed in later commits of the master
   branch (so in 2.4 users should adapt to this change).
2. We were relying on Devise's translations for failures, but some of
   them were not available. This has been addressed and improved: the
   error message will be more on point and more informative to end
   users.

There is still room for improvement, but we can do it in later commits:
let's keep this commit to the point so it can be cherry-picked into the
2.3 branch.

Fixes SUSE#1746
Fixes SUSE#1774

bsc#1073232

Signed-off-by: Miquel Sabaté Solà <[email protected]>
mssola added a commit that referenced this issue May 11, 2018
This commit fixes a couple of bugs present in both master and 2.3:

1. We didn't implement some options that needed to be passed to the LDAP
   backend to fully support SSL connections. This has been addressed
   also in the configuration, but without breaking existing
   installations (e.g. the `method` attribute from 2.3 has been left
   untouched). This will be addressed in later commits of the master
   branch (so in 2.4 users should adapt to this change).
2. We were relying on Devise's translations for failures, but some of
   them were not available. This has been addressed and improved: the
   error message will be more on point and more informative to end
   users.

There is still room for improvement, but we can do it in later commits:
let's keep this commit to the point so it can be cherry-picked into the
2.3 branch.

Fixes #1746
Fixes #1774

bsc#1073232

Signed-off-by: Miquel Sabaté Solà <[email protected]>
vitoravelino pushed a commit to vitoravelino/Portus that referenced this issue May 16, 2018
This commit fixes a couple of bugs present in both master and 2.3:

1. We didn't implement some options that needed to be passed to the LDAP
   backend to fully support SSL connections. This has been addressed
   also in the configuration, but without breaking existing
   installations (e.g. the `method` attribute from 2.3 has been left
   untouched). This will be addressed in later commits of the master
   branch (so in 2.4 users should adapt to this change).
2. We were relying on Devise's translations for failures, but some of
   them were not available. This has been addressed and improved: the
   error message will be more on point and more informative to end
   users.

There is still room for improvement, but we can do it in later commits:
let's keep this commit to the point so it can be cherry-picked into the
2.3 branch.

Fixes SUSE#1746
Fixes SUSE#1774

bsc#1073232

Signed-off-by: Miquel Sabaté Solà <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants