You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/27 08:30:55 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #10488: Add Kerberos Auth for Presto

potiuk commented on a change in pull request #10488:
URL: https://github.com/apache/airflow/pull/10488#discussion_r477108067



##########
File path: scripts/ci/libraries/_kerberos.sh
##########
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
+
+# 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.
+
+network_name="example.com"

Review comment:
       I initially wanted to ask you to capitalize that one, but I think that's the right time we switch to google's bash conventions. I will create an issue for that.

##########
File path: scripts/ci/docker-compose/integration-kerberos.yml
##########
@@ -17,16 +17,55 @@
 ---
 version: "2.2"
 services:
-  kerberos:
-    image: godatadriven/krb5-kdc-server
-    hostname: kerberos
+  kdc-server-example-com:
+    build:
+      context: ..
+      dockerfile: ./docker-files/kdc-server/Dockerfile
+    image: krb5-kdc-server-example-com
+    hostname: krb5-kdc-server-example-com
     domainname: example.com
+    networks:
+      example.com:
+        ipv4_address: 10.5.0.2
+
     volumes:
+      - kerberos-keytabs:/root/kerberos-keytabs
       - /dev/urandom:/dev/random   # Required to get non-blocking entropy source
+
+    environment:
+      - KRB5_TRACE=/dev/stderr
+      - POST_BOOTSTRAP_COMMAND=
+        /opt/kerberos-utils/create_admin.sh alice alice;
+        /opt/kerberos-utils/create_client.sh bob bob /root/kerberos-keytabs/airflow.keytab;

Review comment:
       We had recently discussion about the "alice/bob" characters and having to introduce more "neutral" names. But it's good for now 

##########
File path: scripts/ci/libraries/_kerberos.sh
##########
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
+
+# 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.
+
+network_name="example.com"

Review comment:
       Issue here: https://github.com/apache/airflow/issues/10576

##########
File path: breeze
##########
@@ -630,6 +630,9 @@ function parse_arguments() {
           else
               INTEGRATIONS+=("${INTEGRATION}");
           fi
+          if [[ " ${INTEGRATIONS[*]} " =~ " presto " ]]; then

Review comment:
       :heart: 

##########
File path: scripts/ci/docker-compose/integration-presto.yml
##########
@@ -18,9 +18,30 @@
 version: "2.2"
 services:
   presto:
-    image: prestosql/presto:330
+    build:
+      context: ..
+      dockerfile: ./docker-files/presto/Dockerfile

Review comment:
       Love it - this then will build as needed ! We should do the same with other images we use for Devel.

##########
File path: scripts/ci/docker-compose/integration-kerberos.yml
##########
@@ -17,16 +17,55 @@
 ---
 version: "2.2"
 services:
-  kerberos:
-    image: godatadriven/krb5-kdc-server
-    hostname: kerberos
+  kdc-server-example-com:
+    build:
+      context: ..
+      dockerfile: ./docker-files/kdc-server/Dockerfile

Review comment:
       This is MY favourite part :)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org