Skip to content

Commit

Permalink
LDAP authentication optimization is disabled by now; docker build fix…
Browse files Browse the repository at this point in the history
… for module es63x
  • Loading branch information
coutoPL committed Mar 15, 2024
1 parent e0426b9 commit 539d8f1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,9 @@ object LdapServicesDecoder {
for {
searchUserBaseDn <- c.downField("search_user_base_DN").as[Dn]
userIdAttributeName <- c.downNonEmptyOptionalField("user_id_attribute")
// to be removed in the future (it's a safety-valve)
disableUserAuthenticationOptimization <- c.downField("disable_user_authentication_optimization").as[Option[Boolean]]
} yield UserSearchFilterConfig(
searchUserBaseDN = searchUserBaseDn,
userIdAttribute = userIdAttributeFrom(userIdAttributeName, disableUserAuthenticationOptimization)
userIdAttribute = userIdAttributeFrom(userIdAttributeName, disableUserAuthenticationOptimization = Some(true))
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@ class LdapServicesSettingsTests private(ldapConnectionPoolProvider: UnboundidLda
)
}
}
"User ID attribute is configured to be CN" in {
// todo: uncomment when LDAP authentication optimization is enabled
"User ID attribute is configured to be CN" ignore {
assertDecodingSuccess(
yaml =
s"""
Expand Down
15 changes: 1 addition & 14 deletions es63x/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,7 @@ ARG ROR_VERSION
ENV KIBANA_USER_PASS=kibana
ENV ADMIN_USER_PASS=admin

USER root

RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64" && \
chmod +x /usr/local/bin/gosu && \
gosu nobody true

USER elasticsearch

COPY readonlyrest-${ROR_VERSION}_es${ES_VERSION}.zip /tmp/readonlyrest.zip
COPY init-readonlyrest.yml /usr/share/elasticsearch/config/readonlyrest.yml
COPY ror-entrypoint-es6x.sh /usr/local/bin/ror-entrypoint.sh

RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch file:///tmp/readonlyrest.zip

USER root

ENTRYPOINT ["/usr/local/bin/ror-entrypoint.sh"]
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch file:///tmp/readonlyrest.zip
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ReadonlyRestPlugin(esVersion: String,
.runWhen(Version.greaterOrEqualThan(esVersion, 7, 0, 0),
command = s"${esDir.toString()}/jdk/bin/java -jar ${esDir.toString()}/plugins/readonlyrest/ror-tools.jar patch"
)
.runWhen(Version.greaterOrEqualThan(esVersion, 6, 3, 0) && Version.lowerThan(esVersion, 7, 0, 0),
.runWhen(Version.greaterOrEqualThan(esVersion, 6, 5, 0) && Version.lowerThan(esVersion, 7, 0, 0),
command = s"$$JAVA_HOME/bin/java -jar ${esDir.toString()}/plugins/readonlyrest/ror-tools.jar patch"
)
.user("elasticsearch")
Expand Down

0 comments on commit 539d8f1

Please sign in to comment.