-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dummy identity provider to remove Keystone dependancy
during testing The dummy identity provider (idp) can be enabled by setting the environment variable ESI_DEBUG to True. For now, the dummy idp returns information about a dummy project Some functions from `api/controllers/v1/utils.py` have been moved into the only controllers that use them and turned into static class methods. Allow idp injection through config file
- Loading branch information
Showing
15 changed files
with
317 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,11 @@ | ||
import os | ||
|
||
from esi_leap.common.idp import keystoneIDP, dummyIDP | ||
|
||
CONF = esi_leap.conf.CONF | ||
|
||
|
||
def get_idp(): | ||
module_path, class_name = CONF.esi.idp_plugin_class.rsplit('.', 1) | ||
module = import_module(module_path) | ||
return getattr(module, class_name)() |
This file contains 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,32 @@ | ||
# 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. | ||
|
||
import abc | ||
|
||
|
||
class BaseIDP(abc.ABC): | ||
|
||
@abc.abstractmethod | ||
def get_project_list(): | ||
pass | ||
|
||
@abc.abstractmethod | ||
def get_project_name(self, id, project_list=None): | ||
pass | ||
|
||
@abc.abstractmethod | ||
def get_parent_project_id_tree(project_id): | ||
pass | ||
|
||
@abc.abstractmethod | ||
def get_project_uuid_from_ident(project_ident): | ||
pass |
Oops, something went wrong.