Skip to content

CLOUDSTACK-9369 Fixed Ldap regression#2009

Merged
karuturi merged 1 commit into
4.9from
unknown repository
Apr 23, 2017
Merged

CLOUDSTACK-9369 Fixed Ldap regression#2009
karuturi merged 1 commit into
4.9from
unknown repository

Conversation

@karuturi
Copy link
Copy Markdown
Member

Ldap auto creation of accounts is broken due to the security fix for
CLOUDSTACK-9369.
There was an explicit check to not allow login incase the
user doesnt exist. removed the same.

@karuturi
Copy link
Copy Markdown
Member Author

@rhtyd Can you review the fix?

}
final UserAccount userAccount = _accountService.getActiveUserAccount(username[0], domainId);
if (userAccount == null || !(User.Source.UNKNOWN.equals(userAccount.getSource()) || User.Source.LDAP.equals(userAccount.getSource()))) {
if (userAccount != null && User.Source.SAML2 == userAccount.getSource()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to remove the check userAccount == null? Comparision against Source.SAML2 is fine as long as there are no other user sources other than LDAP, SAML2 and UNKNOWN. (UNKNOWN should be NATIVE though)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case of LDAP, account will be created if it doesnt already exist.
https://cwiki.apache.org/confluence/display/CLOUDSTACK/LDAP%3A+Trust+AD+and+Auto+Import

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, let's keep this. We can revisit if we've more user type for which this may cause a security issue.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Mar 20, 2017

@karuturi done, can you check Travis failure; push -f or close/reopen the PR to kick it again?

@karuturi
Copy link
Copy Markdown
Member Author

I am seeing the same Travis timeout on all the PRs. Will force push again

@karuturi
Copy link
Copy Markdown
Member Author

ping @rhtyd

@karuturi karuturi changed the base branch from master to 4.9 April 19, 2017 08:10
@svenvogel
Copy link
Copy Markdown
Contributor

svenvogel commented Apr 19, 2017

We installed your jar file 4.9.2 with the changes and test the login. all thing work correctly.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Apr 19, 2017

LGTM.
@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-652

Ldap auto creation of accounts is broken due to the security fix for
CLOUDSTACK-9369.
There was an explicit check to not allow login incase the
user doesnt exist. removed the same.
@karuturi karuturi merged commit a5963f2 into apache:4.9 Apr 23, 2017
@karuturi karuturi modified the milestone: 4.10.0.0 Apr 27, 2017
@yadvr yadvr mentioned this pull request Dec 19, 2017
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

Successfully merging this pull request may close these issues.

4 participants