172 lines
4.2 KiB
Python
172 lines
4.2 KiB
Python
'''
|
|
VERIDIC Project - Towards a centralized access control system
|
|
|
|
Copyright (C) 2011 Mikael Ates
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
'''
|
|
|
|
from django.utils.translation import ugettext as _
|
|
|
|
ATTRIBUTE_MAPPING = {
|
|
|
|
"unique_ID": {
|
|
"type": "http://www.w3.org/2001/XMLSchema#string",
|
|
"friendly_name": _("Unique Identifier"),
|
|
"definitions": {
|
|
"X500": {
|
|
"identifiers":
|
|
[
|
|
"uid",
|
|
],
|
|
"friendly_name" :
|
|
[]
|
|
},
|
|
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims": {
|
|
"identifiers":
|
|
[
|
|
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/\
|
|
privatepersonalidentifier",
|
|
],
|
|
"friendly_name":
|
|
[],
|
|
}
|
|
}
|
|
},
|
|
|
|
"surname": {
|
|
"type": "http://www.w3.org/2001/XMLSchema#string",
|
|
"friendly_name": _("Surname"),
|
|
"definitions": {
|
|
"X500": {
|
|
"identifiers":
|
|
[
|
|
"sn",
|
|
"2.5.4.4",
|
|
],
|
|
"friendly_name" :
|
|
[]
|
|
},
|
|
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims": {
|
|
"identifiers":
|
|
[
|
|
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
|
|
"Last Name"
|
|
],
|
|
"friendly_name":
|
|
[],
|
|
}
|
|
}
|
|
},
|
|
|
|
"firstname": {
|
|
"type": "http://www.w3.org/2001/XMLSchema#string",
|
|
"friendly_name": _("First Name"),
|
|
"definitions": {
|
|
"X500": {
|
|
"identifiers":
|
|
[
|
|
"givenName",
|
|
],
|
|
"friendly_name" :
|
|
[]
|
|
},
|
|
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims": {
|
|
"identifiers":
|
|
[
|
|
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",
|
|
],
|
|
"friendly_name":
|
|
[],
|
|
}
|
|
}
|
|
},
|
|
|
|
"displayname": {
|
|
"type": "http://www.w3.org/2001/XMLSchema#string",
|
|
"friendly_name": _("Display Name"),
|
|
"definitions": {
|
|
"X500": {
|
|
"identifiers":
|
|
[
|
|
"displayName",
|
|
],
|
|
"friendly_name" :
|
|
[]
|
|
},
|
|
}
|
|
},
|
|
|
|
"email": {
|
|
"type": "urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name",
|
|
"friendly_name": _("Email Address"),
|
|
"definitions": {
|
|
"X500": {
|
|
"identifiers":
|
|
[
|
|
"mail",
|
|
],
|
|
"friendly_name" :
|
|
[]
|
|
},
|
|
}
|
|
},
|
|
|
|
"title": {
|
|
"type": "http://www.w3.org/2001/XMLSchema#string",
|
|
"friendly_name": _("Title"),
|
|
"definitions": {
|
|
"X500": {
|
|
"identifiers":
|
|
[
|
|
"title",
|
|
],
|
|
"friendly_name" :
|
|
[]
|
|
},
|
|
}
|
|
},
|
|
|
|
"age": {
|
|
"type": "http://www.w3.org/2001/XMLSchema#integer",
|
|
"friendly_name": _("Title"),
|
|
"definitions": {
|
|
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims": {
|
|
"identifiers":
|
|
[
|
|
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth",
|
|
],
|
|
"friendly_name" :
|
|
[]
|
|
},
|
|
}
|
|
},
|
|
|
|
"nationality": {
|
|
"type": "http://www.w3.org/2001/XMLSchema#string",
|
|
"friendly_name": _("Nationality"),
|
|
"definitions": {
|
|
"ISO7501-1": {
|
|
"identifiers":
|
|
[
|
|
"Nationality",
|
|
],
|
|
"friendly_name" :
|
|
[]
|
|
},
|
|
}
|
|
},
|
|
|
|
}
|