def app(request): _app.config.from_object("peregrine.test_settings") app_init(_app) sheepdog_blueprint = sheepdog.blueprint.create_blueprint('submission') _app.register_blueprint(sheepdog_blueprint, url_prefix='/v0/submission') _app.logger.info('Initializing IndexClient') _app.index_client = IndexClient( _app.config['INDEX_CLIENT']['host'], version=_app.config['INDEX_CLIENT']['version'], auth=_app.config['INDEX_CLIENT']['auth']) try: _app.logger.info('Initializing Auth driver') except Exception: _app.logger.exception("Couldn't initialize auth, continuing anyway") _app.logger.setLevel(os.environ.get("GDC_LOG_LEVEL", "WARNING")) _app.jwt_public_keys = { _app.config['USER_API']: { 'key-test': utils.read_file('resources/keys/test_public_key.pem') } } return _app
def app(request, start_signpost): _app.config.from_object("peregrine.test_settings") app_init(_app) sheepdog_blueprint = sheepdog.blueprint.create_blueprint('submission') _app.register_blueprint(sheepdog_blueprint, url_prefix='/v0/submission') _app.logger.info('Initializing Signpost driver') _app.signpost = SignpostClient(_app.config['SIGNPOST']['host'], version=_app.config['SIGNPOST']['version'], auth=_app.config['SIGNPOST']['auth']) try: _app.logger.info('Initializing Auth driver') #_app.auth = AuthDriver(_app.config["AUTH_ADMIN_CREDS"], _app.config["INTERNAL_AUTH"]) except Exception: _app.logger.exception("Couldn't initialize auth, continuing anyway") _app.logger.setLevel(os.environ.get("GDC_LOG_LEVEL", "WARNING")) _app.jwt_public_keys = { _app.config['USER_API']: { 'key-test': utils.read_file('resources/keys/test_public_key.pem') } } return _app
def app(request): _app.config.from_object("peregrine.test_settings") app_init(_app) sheepdog_blueprint = sheepdog.blueprint.create_blueprint("submission") _app.register_blueprint(sheepdog_blueprint, url_prefix="/v0/submission") _app.logger.info("Initializing IndexClient") _app.index_client = IndexClient( _app.config["INDEX_CLIENT"]["host"], version=_app.config["INDEX_CLIENT"]["version"], auth=_app.config["INDEX_CLIENT"]["auth"], ) try: _app.logger.info("Initializing Auth driver") except Exception: _app.logger.exception("Couldn't initialize auth, continuing anyway") _app.logger.setLevel(os.environ.get("GDC_LOG_LEVEL", "WARNING")) _app.jwt_public_keys = { _app.config["USER_API"]: { "key-test": utils.read_file("resources/keys/test_public_key.pem") } } return _app
'authorize_url': 'https://%s/user/oauth2/authorize' % conf_data['hostname'], 'access_token_url': 'https://%s/user/oauth2/token' % conf_data['hostname'], 'refresh_token_url': 'https://%s/user/oauth2/token' % conf_data['hostname'], 'client_kwargs': { 'redirect_uri': 'https://%s/api/v0/oauth2/authorize' % conf_data['hostname'], 'scope': 'openid data user', }, # deprecated key values, should be removed after all commons use new oidc 'internal_oauth_provider': 'http://fence-service/oauth2/', 'oauth_provider': 'https://%s/user/oauth2/' % conf_data['hostname'], 'redirect_uri': 'https://%s/api/v0/oauth2/authorize' % conf_data['hostname'] } config['USER_API'] = 'http://fence-service/' # option to force authutils to prioritize USER_API setting over the issuer from # token when redirecting, used during local docker compose setup when the # services are on different containers but the hostname is still localhost config['FORCE_ISSUER'] = True app_init(app) application = app application.debug = (environ.get('GEN3_DEBUG') == "True")