-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from cloudforet-io/feature-identity-v2
Feature identity v2
- Loading branch information
Showing
167 changed files
with
5,367 additions
and
6,013 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ test/reports | |
test/_trial_temp | ||
/test/api/config.yml | ||
skaffold.yaml | ||
|
||
/src/spaceone/identity_v1 |
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 |
---|---|---|
|
@@ -17,30 +17,28 @@ | |
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name='spaceone-identity', | ||
version=os.environ.get('PACKAGE_VERSION'), | ||
description='SpaceONE identity service', | ||
long_description='', | ||
url='https://www.spaceone.dev/', | ||
author='MEGAZONE SpaceONE Team', | ||
author_email='[email protected]', | ||
license='Apache License 2.0', | ||
name="spaceone-identity", | ||
version=os.environ.get("PACKAGE_VERSION"), | ||
description="SpaceONE identity service", | ||
long_description="", | ||
url="https://www.spaceone.dev/", | ||
author="MEGAZONE SpaceONE Team", | ||
author_email="[email protected]", | ||
license="Apache License 2.0", | ||
packages=find_packages(), | ||
install_requires=[ | ||
'spaceone-core', | ||
'spaceone-api', | ||
'mongoengine', | ||
'langcodes', | ||
'bcrypt', | ||
"spaceone-core", | ||
"spaceone-api", | ||
"mongoengine", | ||
"langcodes", | ||
"bcrypt", | ||
# 'bcrypt==3.1.6', | ||
'redis', | ||
'jinja2', | ||
'fakeredis', | ||
'mongomock', | ||
'pytz' | ||
"redis", | ||
"jinja2", | ||
"fakeredis", | ||
"mongomock", | ||
"pytz", | ||
], | ||
package_data={ | ||
'spaceone': ['identity/template/*.html'] | ||
}, | ||
package_data={"spaceone": ["identity/template/*.html"]}, | ||
zip_safe=False, | ||
) |
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 |
---|---|---|
@@ -1 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) | ||
__path__ = __import__("pkgutil").extend_path(__path__, __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 |
---|---|---|
@@ -1 +1 @@ | ||
name = 'identity' | ||
__name__ = "identity" |
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 |
---|---|---|
@@ -1,11 +1,17 @@ | ||
ROOT_DOMAIN_NAME = 'root' | ||
EMAIL_CONSOLE_DOMAIN = '' | ||
EMAIL_SERVICE_NAME = 'Cloudforet' | ||
# ACCESS_TOKEN (default) / PASSWORD | ||
RESET_PASSWORD_TYPE = 'ACCESS_TOKEN' | ||
# Root Domain Settings | ||
ROOT_DOMAIN_NAME = "root" | ||
|
||
# Email Settings | ||
EMAIL_CONSOLE_DOMAIN = "" | ||
EMAIL_SERVICE_NAME = "Cloudforet" | ||
|
||
# Enums: ACCESS_TOKEN (default) | PASSWORD | ||
RESET_PASSWORD_TYPE = "ACCESS_TOKEN" | ||
|
||
# Database Settings | ||
DATABASE_AUTO_CREATE_INDEX = True | ||
DATABASES = { | ||
'default': { | ||
"default": { | ||
# 'db': '', | ||
# 'host': '', | ||
# 'port': 0, | ||
|
@@ -16,110 +22,74 @@ | |
} | ||
} | ||
|
||
# Cache Settings | ||
CACHES = { | ||
'default': {}, | ||
'local': { | ||
'backend': 'spaceone.core.cache.local_cache.LocalCache', | ||
'max_size': 128, | ||
'ttl': 300 | ||
} | ||
"default": {}, | ||
"local": { | ||
"backend": "spaceone.core.cache.local_cache.LocalCache", | ||
"max_size": 128, | ||
"ttl": 300, | ||
}, | ||
} | ||
|
||
# Identity Settings | ||
IDENTITY = { | ||
'token': { | ||
'verify_code_timeout': 3600, | ||
'temporary_token_timeout': 86400, # 24 hours | ||
'token_timeout': 1200, | ||
'refresh_timeout': 1800, | ||
'refresh_ttl': 18, | ||
'refresh_once': False | ||
"token": { | ||
"verify_code_timeout": 3600, | ||
"temporary_token_timeout": 86400, # 24 hours | ||
"token_timeout": 1200, | ||
"refresh_timeout": 1800, | ||
"refresh_ttl": 18, | ||
"refresh_once": False, | ||
}, | ||
'mfa': { | ||
'mfa_verify_code_timeout': 300 | ||
} | ||
"mfa": {"mfa_verify_code_timeout": 300}, | ||
} | ||
|
||
# Handler Settings | ||
HANDLERS = { | ||
# 'authentication': [{ | ||
# 'backend': 'spaceone.core.handler.authentication_handler.AuthenticationGRPCHandler', | ||
# 'uri': 'grpc://localhost:50051/v1/Domain/get_public_key' | ||
# "authentication": [{ | ||
# "backend": "spaceone.core.handler.authentication_handler.AuthenticationGRPCHandler", | ||
# "uri": "grpc://localhost:50051/v1/Domain/get_public_key" | ||
# }], | ||
# 'authorization': [{ | ||
# 'backend': 'spaceone.core.handler.authorization_handler.AuthorizationGRPCHandler', | ||
# 'uri': 'grpc://localhost:50051/v1/Authorization/verify' | ||
# "authorization": [{ | ||
# "backend": "spaceone.core.handler.authorization_handler.AuthorizationGRPCHandler", | ||
# "uri": "grpc://localhost:50051/v1/Authorization/verify" | ||
# }], | ||
# 'mutation': [{ | ||
# 'backend': 'spaceone.core.handler.mutation_handler.SpaceONEMutationHandler' | ||
# "mutation": [{ | ||
# "backend": "spaceone.core.handler.mutation_handler.SpaceONEMutationHandler" | ||
# }], | ||
# 'event': [] | ||
# "event": [] | ||
} | ||
|
||
# Connector Settings | ||
CONNECTORS = { | ||
'SpaceConnector': { | ||
'backend': 'spaceone.core.connector.space_connector.SpaceConnector', | ||
'endpoints': { | ||
'plugin': 'grpc://plugin:50051', | ||
'secret': 'grpc://secret:50051', | ||
'repository': 'grpc://repository:50051' | ||
} | ||
"SpaceConnector": { | ||
"backend": "spaceone.core.connector.space_connector.SpaceConnector", | ||
"endpoints": { | ||
"plugin": "grpc://plugin:50051", | ||
"secret": "grpc://secret:50051", | ||
"repository": "grpc://repository:50051", | ||
}, | ||
}, | ||
"SMTPConnector": { | ||
# "host": "smtp.mail.com", | ||
# "port": "1234", | ||
# "user": "cloudforet", | ||
# "password": "1234", | ||
# "from_email": "[email protected]", | ||
}, | ||
'SMTPConnector': { | ||
'host': 'smtp.mail.com', | ||
'port': '1234', | ||
'user': 'cloudforet', | ||
'password': '1234', | ||
'from_email': '[email protected]' | ||
} | ||
} | ||
|
||
# Endpoint Settings | ||
ENDPOINTS = [ | ||
# { | ||
# 'service': 'identity', | ||
# 'name': 'Identity Service', | ||
# 'endpoint': 'grpc://<endpoint>>:<port>/v1' | ||
# "service": "identity", | ||
# "name": "Identity Service", | ||
# "endpoint": "grpc://<endpoint>>:<port>" | ||
# }, | ||
] | ||
|
||
# Internal Endpoint | ||
INTERNAL_ENDPOINTS = [ | ||
{ | ||
'service': 'identity', | ||
'name': 'Identity Service', | ||
'endpoint': 'grpc://identity.spaceone.svc.cluster.local:50051/v1' | ||
}, | ||
{ | ||
'service': 'secret', | ||
'name': 'Secret Service', | ||
'endpoint': 'grpc://secret.spaceone.svc.cluster.local:50051/v1' | ||
}, | ||
{ | ||
'service': 'repository', | ||
'name': 'Repository Service', | ||
'endpoint': 'grpc://repository.spaceone.svc.cluster.local:50051/v1' | ||
}, | ||
{ | ||
'service': 'plugin', | ||
'name': 'Plugin Service', | ||
'endpoint': 'grpc://plugin.spaceone.svc.cluster.local:50051/v1' | ||
}, | ||
{ | ||
'service': 'config', | ||
'name': 'Config Service', | ||
'endpoint': 'grpc://config.spaceone.svc.cluster.local:50051/v1' | ||
}, | ||
{ | ||
'service': 'inventory', | ||
'name': 'Inventory Service', | ||
'endpoint': 'grpc://inventory.spaceone.svc.cluster.local:50051/v1' | ||
}, | ||
{ | ||
'service': 'monitoring', | ||
'name': 'Monitoring Service', | ||
'endpoint': 'grpc://monitoring.spaceone.svc.cluster.local:50051/v1' | ||
}, | ||
{ | ||
'service': 'statistics', | ||
'name': 'Statistics Service', | ||
'endpoint': 'grpc://statistics.spaceone.svc.cluster.local:50051/v1' | ||
} | ||
# { | ||
# "service": "inventory", | ||
# "name": "Inventory Service", | ||
# "endpoint": "grpc+ssl://<endpoint>>:<port>" | ||
# } | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +0,0 @@ | ||
from spaceone.identity.connector.auth_plugin_connector import AuthPluginConnector | ||
from spaceone.identity.connector.smtp_connector import SMTPConnector | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.