Repository: aurora Updated Branches: refs/heads/master d327773d0 -> 6cab9c51f
Use hostname instead of IP in Kerberos end to end test. Testing Done: ./src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh Bugs closed: AURORA-1409 Reviewed at https://reviews.apache.org/r/36998/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/6cab9c51 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/6cab9c51 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/6cab9c51 Branch: refs/heads/master Commit: 6cab9c51f34c0037e17a9590e8f486295d74280b Parents: d327773 Author: Kevin Sweeney <[email protected]> Authored: Fri Jul 31 14:16:14 2015 -0700 Committer: Kevin Sweeney <[email protected]> Committed: Fri Jul 31 14:16:14 2015 -0700 ---------------------------------------------------------------------- examples/vagrant/upstart/aurora-scheduler-kerberos.conf | 4 ++-- .../sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/6cab9c51/examples/vagrant/upstart/aurora-scheduler-kerberos.conf ---------------------------------------------------------------------- diff --git a/examples/vagrant/upstart/aurora-scheduler-kerberos.conf b/examples/vagrant/upstart/aurora-scheduler-kerberos.conf index 02c9e6a..744b4a3 100644 --- a/examples/vagrant/upstart/aurora-scheduler-kerberos.conf +++ b/examples/vagrant/upstart/aurora-scheduler-kerberos.conf @@ -52,6 +52,6 @@ exec bin/aurora-scheduler \ -shiro_realm_modules=KERBEROS5_AUTHN,INI_AUTHNZ \ -shiro_ini_path=/home/vagrant/aurora/src/test/resources/org/apache/aurora/scheduler/http/api/security/shiro-example.ini \ -http_authentication_mechanism=NEGOTIATE \ - -kerberos_server_keytab=/home/vagrant/krb5-1.13.1/build/testdir/HTTP-192.168.33.7.keytab \ - -kerberos_server_principal=HTTP/[email protected] \ + -kerberos_server_keytab=/home/vagrant/krb5-1.13.1/build/testdir/HTTP-aurora.local.keytab \ + -kerberos_server_principal=HTTP/[email protected] \ -enable_h2_console=true http://git-wip-us.apache.org/repos/asf/aurora/blob/6cab9c51/src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh ---------------------------------------------------------------------- diff --git a/src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh b/src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh index 760997c..82ff868 100755 --- a/src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh +++ b/src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh @@ -22,6 +22,7 @@ readonly KRB5_URL_BASE=http://web.mit.edu/kerberos/dist/krb5/ readonly KRB5_SIGNED_TARBALL=krb5-$KRB5_VERSION-signed.tar readonly KRB5_TARBALL=krb5-$KRB5_VERSION.tar.gz readonly KRB5_KEY_ID=0x749D7889 +readonly SCHEDULER_HOSTNAME=aurora.local function enter_vagrant { exec vagrant ssh -- /vagrant/src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh "$@" @@ -56,7 +57,7 @@ function snapshot_as { kinit -k -t "testdir/${principal}.keytab" $principal curl -u : --negotiate -w '%{http_code}\n' \ -o $(printf $SNAPSHOT_RESPONSE_OUTFILE $principal) \ - -s 'http://192.168.33.7:8081/api' \ + -v "http://$SCHEDULER_HOSTNAME:8081/api" \ --data-binary "$SNAPSHOT_RPC_DATA" kdestroy } @@ -67,7 +68,7 @@ function h2console_as { kinit -k -t "testdir/${principal}.keytab" $principal curl -u : --negotiate -w '%{http_code}\n' \ -o $(printf $H2_RESPONSE_OUTFILE $principal) \ - -s 'http://192.168.33.7:8081/h2console/' + -s "http://$SCHEDULER_HOSTNAME:8081/h2console/" kdestroy } @@ -84,9 +85,9 @@ EOF sudo start aurora-scheduler-kerberos await_scheduler_ready - kadmin.local -q "addprinc -randkey HTTP/192.168.33.7" - rm -f testdir/HTTP-192.168.33.7.keytab.keytab - kadmin.local -q "ktadd -keytab testdir/HTTP-192.168.33.7.keytab HTTP/192.168.33.7" + kadmin.local -q "addprinc -randkey HTTP/$SCHEDULER_HOSTNAME" + rm -f testdir/HTTP-$SCHEDULER_HOSTNAME.keytab.keytab + kadmin.local -q "ktadd -keytab testdir/HTTP-$SCHEDULER_HOSTNAME.keytab HTTP/$SCHEDULER_HOSTNAME" kadmin.local -q "addprinc -randkey vagrant" rm -f testdir/vagrant.keytab
