Federated authentication via ECP functional tests

Adds a first test for the federated authentication feature. It handles
first the authentication using the SAML2 ECP profile.

The tests cleanup have some issues, see related bug.

Related-Bug: 1642692
Change-Id: I3b393a695c6d9f846efdaf302c1beea34e6bd54b
diff --git a/keystone_tempest_plugin/tests/base.py b/keystone_tempest_plugin/tests/base.py
new file mode 100644
index 0000000..83f5c12
--- /dev/null
+++ b/keystone_tempest_plugin/tests/base.py
@@ -0,0 +1,41 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed 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 tempest.common import credentials_factory as common_creds
+from tempest import test
+
+from keystone_tempest_plugin import clients
+
+
+class BaseIdentityTest(test.BaseTestCase):
+
+    # The version of the identity that will be used in the tests.
+    identity_version = 'v3'
+
+    # NOTE(rodrigods): for now, all tests are in the admin scope, if
+    # necessary, another class can be created to handle non-admin tests.
+    credential_type = 'identity_admin'
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseIdentityTest, cls).setup_clients()
+        credentials = common_creds.get_configured_admin_credentials(
+            cls.credential_type, identity_version=cls.identity_version)
+        cls.keystone_manager = clients.Manager(credentials=credentials)
+        cls.auth_client = cls.keystone_manager.auth_client
+        cls.idps_client = cls.keystone_manager.identity_providers_client
+        cls.mappings_client = cls.keystone_manager.mapping_rules_client
+        cls.saml2_client = cls.keystone_manager.saml2_client
+        cls.sps_client = cls.keystone_manager.service_providers_client
+        cls.tokens_client = cls.keystone_manager.token_v3_client