-
Notifications
You must be signed in to change notification settings - Fork 17.5k
Add Kerberos Auth for Presto #10488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add Kerberos Auth for Presto #10488
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,64 +1,55 @@ | ||
| # Dockerfile - kdc-server | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| FROM debian:buster-slim | ||
| # see docker-compose.yml | ||
|
|
||
| ARG AIRFLOW_KRB5KDCSERVER_VERSION | ||
| ARG COMMIT_SHA | ||
| FROM centos:7 | ||
|
|
||
| # environment variables | ||
| ENV DEBIAN_FRONTEND noninteractive | ||
| # build environment | ||
| WORKDIR /root/ | ||
|
|
||
| # Kerberos server | ||
| RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
| dumb-init \ | ||
| ntp \ | ||
| python-dev \ | ||
| python-pip \ | ||
| python-wheel \ | ||
| python-setuptools \ | ||
| python-pkg-resources \ | ||
| krb5-admin-server \ | ||
| krb5-kdc \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && mkdir -p /var/log/supervisord/ | ||
| # Dev stuff | ||
| RUN yum -y install curl wget | ||
|
|
||
| RUN mkdir /app/ | ||
| # python | ||
| RUN curl "https://bootstrap.pypa.io/get-pip.py" -o /tmp/get-pip.py && \ | ||
| python /tmp/get-pip.py && \ | ||
| rm /tmp/get-pip.py | ||
|
|
||
| # Supervisord | ||
| RUN pip install supervisor==3.3.4 | ||
|
|
||
| COPY ./krb-conf/server/kdc.conf /etc/krb5kdc/kdc.conf | ||
| COPY ./krb-conf/server/kadm5.acl /etc/krb5kdc/kadm5.acl | ||
| COPY ./krb-conf/client/krb5.conf /etc/krb5.conf | ||
| COPY ./start_kdc.sh /entrypoint | ||
| # supervisord | ||
| COPY ./supervisord.conf /etc/supervisord.conf | ||
|
|
||
| WORKDIR /app | ||
| RUN pip install supervisor==3.3.3 && \ | ||
| mkdir -p /var/log/supervisord/ | ||
|
|
||
| # kerberos server | ||
| RUN yum -y install ntp krb5-server krb5-libs | ||
|
|
||
| # kerberos server configuration | ||
| ENV KRB5_CONFIG=/etc/krb5.conf | ||
| ENV KRB5_KDC_PROFILE=/var/kerberos/krb5kdc/kdc.conf | ||
| RUN mkdir -pv /var/kerberos/krb5kdc/ | ||
| COPY kdc.conf /var/kerberos/krb5kdc/kdc.conf | ||
| COPY kadm5.acl /var/kerberos/krb5kdc/kadm5.acl | ||
| COPY krb5.conf /etc/krb5.conf | ||
| RUN mkdir -pv /var/log/kerberos/ && \ | ||
| touch /var/log/kerberos/kadmin.log && \ | ||
| touch /var/log/kerberos/krb5lib.log && \ | ||
| touch /var/log/kerberos/krb5.log && \ | ||
| kdb5_util -r EXAMPLE.COM -P krb5 create -s | ||
|
|
||
| # kerberos utils | ||
| COPY utils /opt/kerberos-utils/ | ||
|
|
||
| # supervisord configuration | ||
| COPY supervisord.conf /etc/supervisord.conf | ||
|
|
||
| # entrypoint | ||
| COPY entrypoint.sh /entrypoint.sh | ||
| ENTRYPOINT ["/entrypoint.sh"] | ||
|
|
||
| LABEL org.apache.airflow.component="krb5-kdc-server" | ||
| LABEL org.apache.airflow.airflow_krb5_kdc_server.version="${AIRFLOW_KRB5KDCSERVER_VERSION}" | ||
| LABEL org.apache.airflow.krb5-kdc-server.core.version="krb5" | ||
| LABEL org.apache.airflow.airflow_bats.version="${AIRFLOW_KRB5KDCSERVER_VERSION}" | ||
| LABEL org.apache.airflow.commit_sha="${COMMIT_SHA}" | ||
| LABEL maintainer="Apache Airflow Community <dev@airflow.apache.org>" | ||
|
|
||
| RUN chmod a+x /entrypoint | ||
|
|
||
| EXPOSE 88 | ||
| # when container is starting | ||
| ENTRYPOINT ["/usr/bin/dumb-init", "--", "/entrypoint"] | ||
| CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"] |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,8 @@ | ||
| # /var/kerberos/krb5kdc/kadm5.acl -- Kerberos V5 general configuration. | ||
| # | ||
| # This file is the access control list for krb5 administration. | ||
| # When this file is edited run /etc/init.d/krb5-admin-server restart to activate | ||
| # One common way to set up Kerberos administration is to allow any principal | ||
| # ending in /admin is given full administrative rights. | ||
| # To enable this, uncomment the following line: | ||
| */admin@EXAMPLE.COM * |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.