"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/auth/plugins/mapped.py" between
keystone-16.0.1.tar.gz and keystone-17.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 "Ussuri" series (latest release).

mapped.py  (keystone-16.0.1):mapped.py  (keystone-17.0.0)
skipping to change at line 19 skipping to change at line 19
# 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 uuid import uuid
import flask import flask
from oslo_log import log from oslo_log import log
from pycadf import cadftaxonomy as taxonomy from pycadf import cadftaxonomy as taxonomy
from six.moves.urllib import parse from urllib import parse
from keystone.auth import plugins as auth_plugins from keystone.auth import plugins as auth_plugins
from keystone.auth.plugins import base from keystone.auth.plugins import base
from keystone.common import provider_api from keystone.common import provider_api
from keystone import exception from keystone import exception
from keystone.federation import constants as federation_constants from keystone.federation import constants as federation_constants
from keystone.federation import utils from keystone.federation import utils
from keystone.i18n import _ from keystone.i18n import _
from keystone import notifications from keystone import notifications
skipping to change at line 235 skipping to change at line 235
except exception.ValidationError as e: except exception.ValidationError as e:
# if mapping is either invalid or yield no valid identity, # if mapping is either invalid or yield no valid identity,
# it is considered a failed authentication # it is considered a failed authentication
raise exception.Unauthorized(e) raise exception.Unauthorized(e)
if is_ephemeral_user(mapped_properties): if is_ephemeral_user(mapped_properties):
unique_id, display_name = ( unique_id, display_name = (
get_user_unique_id_and_display_name(mapped_properties) get_user_unique_id_and_display_name(mapped_properties)
) )
email = mapped_properties['user'].get('email') email = mapped_properties['user'].get('email')
user = identity_api.shadow_federated_user(identity_provider, user = identity_api.shadow_federated_user(
protocol, unique_id, identity_provider,
display_name, protocol, unique_id,
email) display_name,
email,
group_ids=mapped_properties['group_ids'])
if 'projects' in mapped_properties: if 'projects' in mapped_properties:
idp_domain_id = federation_api.get_idp( idp_domain_id = federation_api.get_idp(
identity_provider identity_provider
)['domain_id'] )['domain_id']
existing_roles = { existing_roles = {
role['name']: role for role in role_api.list_roles() role['name']: role for role in role_api.list_roles()
} }
# NOTE(lbragstad): If we are dealing with a shadow mapping, # NOTE(lbragstad): If we are dealing with a shadow mapping,
# then we need to make sure we validate all pieces of the # then we need to make sure we validate all pieces of the
 End of changes. 2 change blocks. 
5 lines changed or deleted 7 lines changed or added

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