Authenticate all API calls
There are no PUBLIC_ENDPOINTS in our ReST API. THis was copied from Solum which does have some public endpoints. As a result, just remove all of the public endpoints. Now auth is done on every API call. Also it is helpful to install the authentication wrapper. Change-Id: I197f690ef6f2ea0756503ee2d44fb721e840f256changes/26/137226/3
parent
aaa31eefce
commit
a6e2e42115
|
@ -13,6 +13,7 @@
|
|||
from oslo.config import cfg
|
||||
import pecan
|
||||
|
||||
from magnum.api import auth
|
||||
from magnum.api import config as api_config
|
||||
from magnum.api import model
|
||||
|
||||
|
@ -46,8 +47,9 @@ def setup_app(config=None):
|
|||
model.init_model()
|
||||
app_conf = dict(config.app)
|
||||
|
||||
return pecan.make_app(
|
||||
app = pecan.make_app(
|
||||
app_conf.pop('root'),
|
||||
logging=getattr(config, 'logging', {}),
|
||||
**app_conf
|
||||
)
|
||||
return auth.install(app, CONF)
|
||||
|
|
|
@ -41,11 +41,6 @@ CONF.register_opts(AUTH_OPTS)
|
|||
CONF.register_opts(auth_token.opts, group=OPT_GROUP_NAME)
|
||||
|
||||
PUBLIC_ENDPOINTS = [
|
||||
'^/?$',
|
||||
'^/v[0-9]+/?$',
|
||||
'^/v[0-9]+/triggers',
|
||||
'^/camp/platform_endpoints',
|
||||
'^/camp/camp_v1_1_endpoint'
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue