Skip to content

GUACAMOLE-593: Allow group membership attribute to be configured.#308

Merged
asfgit merged 2 commits intoapache:masterfrom
necouchman:jira/593
Jul 31, 2018
Merged

GUACAMOLE-593: Allow group membership attribute to be configured.#308
asfgit merged 2 commits intoapache:masterfrom
necouchman:jira/593

Conversation

@necouchman
Copy link
Contributor

This allows the group membership attribute to be modified for the LDAP authentication module for directories that use a different one than the default of "member".

connectionSearchFilter.append("(&(objectClass=guacConfigGroup)(|(member=");
connectionSearchFilter.append("(&(objectClass=guacConfigGroup)");
connectionSearchFilter.append("(|(");
connectionSearchFilter.append(confService.getMemberAttribute());
Copy link
Contributor

Choose a reason for hiding this comment

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

This will need to be escaped with escapingService.escapeLDAPSearchFilter().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Escaped.

LDAPConnection.SCOPE_SUB,
"(&(!(objectClass=guacConfigGroup))(member=" + escapingService.escapeLDAPSearchFilter(userDN) + "))",
"(&(!(objectClass=guacConfigGroup))("
+ confService.getMemberAttribute()
Copy link
Contributor

Choose a reason for hiding this comment

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

This will need to be escaped with escapingService.escapeLDAPSearchFilter(), as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Escaped.


};

public static final StringGuacamoleProperty LDAP_MEMBER_ATTRIBUTE = new StringGuacamoleProperty() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please document.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wow, not sure why I forgot that. Documented.

);
}

public String getMemberAttribute() throws GuacamoleException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please document this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Documented.

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.

3 participants