From 8e11f91b3b7786da518969070a1befeacb783ecc Mon Sep 17 00:00:00 2001 From: tianhang Date: Fri, 20 Jan 2023 15:52:39 +0800 Subject: [PATCH] HBASE-27564 Add default encryption type for MiniKDC to fix failed tests on JDK11+ (#4968) Co-authored-by: tianhang.tang Signed-off-by: Duo Zhang --- .../src/test/resources/minikdc-krb5.conf | 27 +++++++++++++++++++ .../src/test/resources/minikdc-krb5.conf | 27 +++++++++++++++++++ .../src/test/resources/minikdc-krb5.conf | 27 +++++++++++++++++++ .../src/test/resources/minikdc-krb5.conf | 27 +++++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 hbase-endpoint/src/test/resources/minikdc-krb5.conf create mode 100644 hbase-examples/src/test/resources/minikdc-krb5.conf create mode 100644 hbase-http/src/test/resources/minikdc-krb5.conf create mode 100644 hbase-mapreduce/src/test/resources/minikdc-krb5.conf diff --git a/hbase-endpoint/src/test/resources/minikdc-krb5.conf b/hbase-endpoint/src/test/resources/minikdc-krb5.conf new file mode 100644 index 000000000000..0987ef2bcc66 --- /dev/null +++ b/hbase-endpoint/src/test/resources/minikdc-krb5.conf @@ -0,0 +1,27 @@ +# +# 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. +# +[libdefaults] + default_realm = {0} + udp_preference_limit = 1 + default_tkt_enctypes = aes128-cts-hmac-sha1-96 + default_tgs_enctypes = aes128-cts-hmac-sha1-96 + +[realms] + {0} = '{' + kdc = {1}:{2} + '}' diff --git a/hbase-examples/src/test/resources/minikdc-krb5.conf b/hbase-examples/src/test/resources/minikdc-krb5.conf new file mode 100644 index 000000000000..0987ef2bcc66 --- /dev/null +++ b/hbase-examples/src/test/resources/minikdc-krb5.conf @@ -0,0 +1,27 @@ +# +# 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. +# +[libdefaults] + default_realm = {0} + udp_preference_limit = 1 + default_tkt_enctypes = aes128-cts-hmac-sha1-96 + default_tgs_enctypes = aes128-cts-hmac-sha1-96 + +[realms] + {0} = '{' + kdc = {1}:{2} + '}' diff --git a/hbase-http/src/test/resources/minikdc-krb5.conf b/hbase-http/src/test/resources/minikdc-krb5.conf new file mode 100644 index 000000000000..0987ef2bcc66 --- /dev/null +++ b/hbase-http/src/test/resources/minikdc-krb5.conf @@ -0,0 +1,27 @@ +# +# 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. +# +[libdefaults] + default_realm = {0} + udp_preference_limit = 1 + default_tkt_enctypes = aes128-cts-hmac-sha1-96 + default_tgs_enctypes = aes128-cts-hmac-sha1-96 + +[realms] + {0} = '{' + kdc = {1}:{2} + '}' diff --git a/hbase-mapreduce/src/test/resources/minikdc-krb5.conf b/hbase-mapreduce/src/test/resources/minikdc-krb5.conf new file mode 100644 index 000000000000..0987ef2bcc66 --- /dev/null +++ b/hbase-mapreduce/src/test/resources/minikdc-krb5.conf @@ -0,0 +1,27 @@ +# +# 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. +# +[libdefaults] + default_realm = {0} + udp_preference_limit = 1 + default_tkt_enctypes = aes128-cts-hmac-sha1-96 + default_tgs_enctypes = aes128-cts-hmac-sha1-96 + +[realms] + {0} = '{' + kdc = {1}:{2} + '}'