"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/common/rbac_enforcer/enforcer.py" between
keystone-18.0.0.tar.gz and keystone-19.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Wallaby" series (latest release).

enforcer.py  (keystone-18.0.0):enforcer.py  (keystone-19.0.0)
skipping to change at line 17 skipping to change at line 17
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import functools import functools
import flask import flask
from oslo_log import log from oslo_log import log
from oslo_policy import opts
from oslo_policy import policy as common_policy from oslo_policy import policy as common_policy
from oslo_utils import strutils from oslo_utils import strutils
from keystone.common import authorization from keystone.common import authorization
from keystone.common import context from keystone.common import context
from keystone.common import policies from keystone.common import policies
from keystone.common import provider_api from keystone.common import provider_api
from keystone.common import utils from keystone.common import utils
import keystone.conf import keystone.conf
from keystone import exception from keystone import exception
skipping to change at line 39 skipping to change at line 40
CONF = keystone.conf.CONF CONF = keystone.conf.CONF
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
PROVIDER_APIS = provider_api.ProviderAPIs PROVIDER_APIS = provider_api.ProviderAPIs
_POSSIBLE_TARGET_ACTIONS = frozenset([ _POSSIBLE_TARGET_ACTIONS = frozenset([
rule.name for rule.name for
rule in policies.list_rules() if not rule.deprecated_for_removal rule in policies.list_rules() if not rule.deprecated_for_removal
]) ])
_ENFORCEMENT_CHECK_ATTR = 'keystone:RBAC:enforcement_called' _ENFORCEMENT_CHECK_ATTR = 'keystone:RBAC:enforcement_called'
# TODO(gmann): Remove setting the default value of config policy_file
# once oslo_policy change the default value to 'policy.yaml'.
# https://github.com/openstack/oslo.policy/blob/a626ad12fe5a3abd49d70e3e5b95589d
279ab578/oslo_policy/opts.py#L49
DEFAULT_POLICY_FILE = 'policy.yaml'
opts.set_defaults(CONF, DEFAULT_POLICY_FILE)
class RBACEnforcer(object): class RBACEnforcer(object):
"""Enforce RBAC on API calls.""" """Enforce RBAC on API calls."""
__shared_state__ = {} __shared_state__ = {}
__ENFORCER = None __ENFORCER = None
ACTION_STORE_ATTR = 'keystone:RBAC:action_name' ACTION_STORE_ATTR = 'keystone:RBAC:action_name'
# FOR TESTS ONLY # FOR TESTS ONLY
suppress_deprecation_warnings = False suppress_deprecation_warnings = False
def __init__(self): def __init__(self):
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)