forked from provectus/kafka-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add example build for Okta authentication
- Loading branch information
1 parent
b32ab01
commit 92e718e
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM azul/zulu-openjdk-alpine@sha256:a36679ac0d28cb835e2a8c00e1e0d95509c6c51c5081c7782b85edb1f37a771a | ||
|
||
RUN apk add --no-cache \ | ||
# snappy codec | ||
gcompat \ | ||
# configuring timezones | ||
tzdata \ | ||
# bash | ||
bash | ||
|
||
RUN mkdir -p /app/kafka-ui | ||
|
||
COPY example/config /app/kafka-ui/config | ||
COPY example/entrypoint.sh /app/kafka-ui/entrypoint.sh | ||
COPY kafka-ui-api/target/kafka-ui-api-0.0.1-SNAPSHOT.jar /app/kafka-ui/kafka-ui-api.jar | ||
|
||
RUN chmod +x /app/kafka-ui/entrypoint.sh | ||
|
||
EXPOSE 8080 | ||
|
||
WORKDIR /app/kafka-ui | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
./mvnw -pl kafka-ui-api -am -Dmaven.test.skip=true -Ddocker.skip=true -Dcheckstyle.skip clean package -Pprod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
auth: | ||
type: OAUTH2 | ||
oauth2: | ||
client: | ||
okta: | ||
clientId: <client-id> | ||
clientSecret: <client-secret> | ||
scope: [ 'openid', 'profile', 'email', 'groups' ] | ||
client-name: Okta | ||
provider: okta | ||
redirect-uri: "{baseUrl}/login/oauth2/code/okta" | ||
authorization-grant-type: authorization_code | ||
issuer-uri: https://<okta-endpoint> | ||
authorization-uri: <okta-endpoint>/oauth2/v1/authorize | ||
token-uri: <okta-endpoint>/oauth2/v1/token | ||
user-info-uri: <okta-endpoint>/oauth2/v1/userinfo | ||
jwk-set-uri: <okta-endpoint>/oauth2/v1/keys | ||
user-name-attribute: email | ||
custom-params: | ||
type: oauth | ||
roles-field: groups | ||
server: | ||
port: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# Configure proxy Java options | ||
PROXY_JAVA_OPTS='' | ||
if [[ -n $PROXY_HOST && -n $PROXY_PORT ]]; then | ||
PROXY_JAVA_OPTS="$PROXY_JAVA_OPTS -Dhttp.proxyHost=$PROXY_HOST -Dhttp.proxyPort=$PROXY_PORT -Dhttps.proxyHost=$PROXY_HOST -Dhttps.proxyPort=$PROXY_PORT" | ||
fi | ||
if [[ -n $NON_PROXY_HOSTS ]]; then | ||
PROXY_JAVA_OPTS="$PROXY_JAVA_OPTS -Dhttp.nonProxyHosts=$NON_PROXY_HOSTS -Dhttps.nonProxyHosts=$NON_PROXY_HOSTS" | ||
fi | ||
|
||
CMD="java --add-opens java.rmi/javax.rmi.ssl=ALL-UNNAMED $PROXY_JAVA_OPTS -jar -Dspring.profiles.active=test kafka-ui-api.jar" | ||
echo "Starting Kafka UI with command : $CMD" | ||
|
||
eval "exec $CMD" |