Projet

Général

Profil

0001-Modify-federation-storage-so-that-we-can-store-feder.patch

Benjamin Dauvergne, 05 novembre 2014 01:14

Télécharger (31,4 ko)

Voir les différences:

Subject: [PATCH] Modify federation storage so that we can store federation
 relative to the provider model

If the content of name_id_qualifier or name_id_sp_name_qualifier is
equals to the issuer or service provider entity ID then we store a
sentinel value instead, meaning 'same as provider entity ID'. If we
change the provider entity, all federations are still correct.
 authentic2/idp/saml/saml2_endpoints.py             |    9 +-
 authentic2/saml/common.py                          |   16 +-
 ...ntinel_value_in_libertyfederation_qualifiers.py |  309 ++++++++++++++++++++
 3 files changed, 331 insertions(+), 3 deletions(-)
 create mode 100644 authentic2/saml/migrations/0040_plug_sentinel_value_in_libertyfederation_qualifiers.py
authentic2/idp/saml/saml2_endpoints.py
66 66
    send_soap_request, get_saml2_query_request, \
67 67
    get_saml2_request_message_async_binding, create_saml2_server, \
68 68
    get_saml2_metadata, get_sp_options_policy, \
69
    get_entity_id
69
    get_entity_id, AUTHENTIC_SAME_ID_SENTINEL
70 70
import authentic2.saml.saml2utils as saml2utils
71 71
from authentic2.models import AuthenticationEvent
72 72
from common import redirect_to_login, kill_django_sessions
......
269 269
    """After a successfully validated authentication request, build an
270 270
       authentication assertion
271 271
    """
272
    entity_id = get_entity_id(request, reverse(metadata))
272 273
    now = datetime.datetime.utcnow()
273 274
    logger.info("building assertion at %s" % str(now))
274 275
    logger.debug('named Id format is %s' % nid_format)
......
332 333
        logger.debug("nameID persistent, get or create "
333 334
            "federation")
334 335
        kwargs = nameid2kwargs(login.assertion.subject.nameID)
336
        # if qualifiers can be inferred from providers entityID replace them by
337
        # placeholders
338
        if kwargs.get('name_id_qualifier') == entity_id:
339
            kwargs['name_id_qualifier'] = AUTHENTIC_SAME_ID_SENTINEL
340
        if kwargs.get('name_id_sp_name_qualifier') == login.remoteProviderId:
341
            kwargs['name_id_sp_name_qualifier'] = AUTHENTIC_SAME_ID_SENTINEL
335 342
        service_provider = LibertyServiceProvider.objects \
336 343
                .get(liberty_provider__entity_id=login.remoteProviderId)
337 344
        federation, new = LibertyFederation.objects.get_or_create(
authentic2/saml/common.py
30 30
from .. import nonce
31 31

  
32 32
AUTHENTIC_STATUS_CODE_NS = "http://authentic.entrouvert.org/status_code/"
33
AUTHENTIC_SAME_ID_SENTINEL = 'urn:authentic.entrouvert.org:same-as-provider-entity-id'
33 34
AUTHENTIC_STATUS_CODE_UNKNOWN_PROVIDER = AUTHENTIC_STATUS_CODE_NS + \
34 35
    "UnknownProvider"
35 36
AUTHENTIC_STATUS_CODE_MISSING_NAMEID= AUTHENTIC_STATUS_CODE_NS + \
......
234 235
def federations_to_identity_dump(self_entity_id, federations):
235 236
    l = [ START_IDENTITY_DUMP ]
236 237
    for federation in federations:
238
        name_id_qualifier = federation.name_id_qualifier
239
        name_id_sp_name_qualifier = federation.name_id_sp_name_qualifier
240
        # ease migration of federations by making qualifiers relative to the linked idp or sp
237 241
        if federation.sp:
238 242
            sp_id = federation.sp.liberty_provider.entity_id
243
            if name_id_sp_name_qualifier == AUTHENTIC_SAME_ID_SENTINEL:
244
                name_id_sp_name_qualifier = sp_id
245
            if name_id_qualifier == AUTHENTIC_SAME_ID_SENTINEL:
246
                name_id_qualifier = self_entity_id
239 247
        elif federation.idp:
240 248
            sp_id = self_entity_id
249
            if name_id_sp_name_qualifier == AUTHENTIC_SAME_ID_SENTINEL:
250
                name_id_sp_name_qualifier = self_entity_id
251
            if name_id_qualifier == AUTHENTIC_SAME_ID_SENTINEL:
252
                name_id_qualifier = federation.idp.liberty_provider.entity_id
241 253
        qualifiers = []
242 254
        if federation.name_id_qualifier:
243
            qualifiers.append('NameQualifier="%s"' % federation.name_id_qualifier)
255
            qualifiers.append('NameQualifier="%s"' % name_id_qualifier)
244 256
        if federation.name_id_sp_name_qualifier:
245
            qualifiers.append('SPNameQualifier="%s"' % federation.name_id_sp_name_qualifier)
257
            qualifiers.append('SPNameQualifier="%s"' % name_id_sp_name_qualifier)
246 258
        l.append(MIDDLE_IDENTITY_DUMP.format(
247 259
            content=federation.name_id_content,
248 260
            format=federation.name_id_format,
authentic2/saml/migrations/0040_plug_sentinel_value_in_libertyfederation_qualifiers.py
1
# -*- coding: utf-8 -*-
2
from south.v2 import SchemaMigration
3
from django.db.models import F
4

  
5
from authentic2.saml.common import AUTHENTIC_SAME_ID_SENTINEL
6

  
7

  
8
class Migration(SchemaMigration):
9
    no_dry_run = True
10

  
11
    def forwards(self, orm):
12
        print 'Please enter the EntityID of this IdP:'
13
        self_entity_id = raw_input()
14
        orm.LibertyFederation.objects \
15
                .filter(name_id_sp_name_qualifier=F('sp__liberty_provider__entity_id')) \
16
                .update(name_id_sp_name_qualifier=AUTHENTIC_SAME_ID_SENTINEL)
17
        orm.LibertyFederation.objects \
18
                .filter(idp__isnull=True, name_id_qualifier=self_entity_id) \
19
                .update(name_id_qualifier=AUTHENTIC_SAME_ID_SENTINEL)
20
        orm.LibertyFederation.objects \
21
                .filter(name_id_qualifier=F('idp__liberty_provider__entity_id')) \
22
                .update(name_id_qualifier=AUTHENTIC_SAME_ID_SENTINEL)
23
        orm.LibertyFederation.objects \
24
                .filter(sp__isnull=True, name_id_sp_name_qualifier=self_entity_id) \
25
                .update(name_id_sp_name_qualifier=AUTHENTIC_SAME_ID_SENTINEL)
26

  
27

  
28
    def backwards(self, orm):
29
        print 'Please enter the EntityID of this IdP:'
30
        self_entity_id = raw_input()
31
        orm.LibertyFederation.objects \
32
                .filter(sp__isnull=True, name_id_sp_name_qualifier=AUTHENTIC_SAME_ID_SENTINEL) \
33
                .update(name_id_sp_name_qualifier=self_entity_id)
34
        orm.LibertyFederation.objects \
35
                .filter(idp__isnull=True, name_id_qualifier=AUTHENTIC_SAME_ID_SENTINEL) \
36
                .update(name_id_qualifier=self_entity_id)
37
        for lp in orm.LibertyProvider.objects.all():
38
            orm.LibertyFederation.objects \
39
                    .filter(sp__liberty_provider=lp, name_id_sp_name_qualifier=AUTHENTIC_SAME_ID_SENTINEL) \
40
                    .update(name_id_sp_name_qualifier=lp.entity_id)
41
            orm.LibertyFederation.objects \
42
                    .filter(idp__liberty_provider=lp, name_id_qualifier=AUTHENTIC_SAME_ID_SENTINEL) \
43
                    .update(name_id_qualifier=lp.entity_id)
44

  
45
    models = {
46
        u'attribute_aggregator.attributeitem': {
47
            'Meta': {'object_name': 'AttributeItem'},
48
            'attribute_name': ('django.db.models.fields.CharField', [], {'default': "('OpenLDAProotDSE', 'OpenLDAProotDSE')", 'max_length': '100'}),
49
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
50
            'output_name_format': ('django.db.models.fields.CharField', [], {'default': "('urn:oasis:names:tc:SAML:2.0:attrname-format:uri', 'SAMLv2 URI')", 'max_length': '100'}),
51
            'output_namespace': ('django.db.models.fields.CharField', [], {'default': "('Default', 'Default')", 'max_length': '100'}),
52
            'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
53
            'source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['attribute_aggregator.AttributeSource']", 'null': 'True', 'blank': 'True'})
54
        },
55
        u'attribute_aggregator.attributelist': {
56
            'Meta': {'object_name': 'AttributeList'},
57
            'attributes': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'attributes of the list'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['attribute_aggregator.AttributeItem']"}),
58
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
60
        },
61
        u'attribute_aggregator.attributesource': {
62
            'Meta': {'object_name': 'AttributeSource'},
63
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
64
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
65
            'namespace': ('django.db.models.fields.CharField', [], {'default': "('Default', 'Default')", 'max_length': '100'})
66
        },
67
        u'auth.group': {
68
            'Meta': {'object_name': 'Group'},
69
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
71
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
72
        },
73
        u'auth.permission': {
74
            'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
75
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
76
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
77
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
78
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
79
        },
80
        u'auth.user': {
81
            'Meta': {'object_name': 'User'},
82
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
83
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
84
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
85
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
86
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
87
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
88
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
89
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
90
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
91
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
92
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
93
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
94
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
95
        },
96
        u'contenttypes.contenttype': {
97
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
98
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
99
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
100
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
101
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
102
        },
103
        u'idp.attributepolicy': {
104
            'Meta': {'object_name': 'AttributePolicy'},
105
            'allow_attributes_selection': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
106
            'ask_consent_attributes': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
107
            'attribute_filter_for_sso_from_push_sources': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filter attributes of push sources with list'", 'null': 'True', 'to': u"orm['attribute_aggregator.AttributeList']"}),
108
            'attribute_list_for_sso_from_pull_sources': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attributes from pull sources'", 'null': 'True', 'to': u"orm['attribute_aggregator.AttributeList']"}),
109
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
110
            'filter_source_of_filtered_attributes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
111
            'forward_attributes_from_push_sources': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
112
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
113
            'map_attributes_from_push_sources': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
114
            'map_attributes_of_filtered_attributes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
115
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
116
            'output_name_format': ('django.db.models.fields.CharField', [], {'default': "('urn:oasis:names:tc:SAML:2.0:attrname-format:uri', 'SAMLv2 URI')", 'max_length': '100'}),
117
            'output_namespace': ('django.db.models.fields.CharField', [], {'default': "('Default', 'Default')", 'max_length': '100'}),
118
            'send_error_and_no_attrs_if_missing_required_attrs': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
119
            'source_filter_for_sso_from_push_sources': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'filter attributes of push sources with sources'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['attribute_aggregator.AttributeSource']"})
120
        },
121
        u'saml.authorizationattributemap': {
122
            'Meta': {'object_name': 'AuthorizationAttributeMap'},
123
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
124
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'})
125
        },
126
        u'saml.authorizationattributemapping': {
127
            'Meta': {'object_name': 'AuthorizationAttributeMapping'},
128
            'attribute_name': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
129
            'attribute_value': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
130
            'attribute_value_format': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}),
131
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
132
            'map': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['saml.AuthorizationAttributeMap']"}),
133
            'source_attribute_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'})
134
        },
135
        u'saml.authorizationsppolicy': {
136
            'Meta': {'object_name': 'AuthorizationSPPolicy'},
137
            'attribute_map': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'authorization_attributes'", 'null': 'True', 'to': u"orm['saml.AuthorizationAttributeMap']"}),
138
            'default_denial_message': ('django.db.models.fields.CharField', [], {'default': "u'You are not authorized to access the service.'", 'max_length': '80'}),
139
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
140
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
141
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'})
142
        },
143
        u'saml.idpoptionssppolicy': {
144
            'Meta': {'object_name': 'IdPOptionsSPPolicy'},
145
            'accept_slo': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
146
            'allow_create': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
147
            'back_url': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '200'}),
148
            'binding_for_sso_response': ('django.db.models.fields.CharField', [], {'default': "'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact'", 'max_length': '200'}),
149
            'enable_binding_for_sso_response': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
150
            'enable_http_method_for_defederation_request': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
151
            'enable_http_method_for_slo_request': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
152
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
153
            'force_user_consent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
154
            'forward_slo': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
155
            'handle_persistent': ('django.db.models.fields.CharField', [], {'default': "'AUTHSAML2_UNAUTH_PERSISTENT_ACCOUNT_LINKING_BY_AUTH'", 'max_length': '200'}),
156
            'handle_transient': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '200'}),
157
            'http_method_for_defederation_request': ('django.db.models.fields.IntegerField', [], {'default': '5', 'max_length': '200'}),
158
            'http_method_for_slo_request': ('django.db.models.fields.IntegerField', [], {'default': '4', 'max_length': '200'}),
159
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
160
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
161
            'no_nameid_policy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
162
            'persistent_identifier_attribute': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
163
            'requested_name_id_format': ('django.db.models.fields.CharField', [], {'default': "'none'", 'max_length': '200'}),
164
            'transient_is_persistent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
165
            'want_authn_request_signed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
166
            'want_force_authn_request': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
167
            'want_is_passive_authn_request': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
168
        },
169
        u'saml.keyvalue': {
170
            'Meta': {'object_name': 'KeyValue'},
171
            'key': ('django.db.models.fields.CharField', [], {'max_length': '128', 'primary_key': 'True'}),
172
            'value': ('authentic2.saml.fields.PickledObjectField', [], {})
173
        },
174
        u'saml.libertyartifact': {
175
            'Meta': {'object_name': 'LibertyArtifact'},
176
            'artifact': ('django.db.models.fields.CharField', [], {'max_length': '128', 'primary_key': 'True'}),
177
            'content': ('django.db.models.fields.TextField', [], {}),
178
            'creation': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
179
            'provider_id': ('django.db.models.fields.CharField', [], {'max_length': '256'})
180
        },
181
        u'saml.libertyassertion': {
182
            'Meta': {'object_name': 'LibertyAssertion'},
183
            'assertion': ('django.db.models.fields.TextField', [], {}),
184
            'assertion_id': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
185
            'creation': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
186
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
187
            'provider_id': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
188
            'session_index': ('django.db.models.fields.CharField', [], {'max_length': '128'})
189
        },
190
        u'saml.libertyfederation': {
191
            'Meta': {'object_name': 'LibertyFederation'},
192
            'creation': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
193
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
194
            'idp': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['saml.LibertyIdentityProvider']", 'null': 'True', 'blank': 'True'}),
195
            'last_modification': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
196
            'name_id_content': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
197
            'name_id_format': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
198
            'name_id_qualifier': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
199
            'name_id_sp_name_qualifier': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
200
            'sp': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['saml.LibertyServiceProvider']", 'null': 'True', 'blank': 'True'}),
201
            'termination_notified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
202
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
203
        },
204
        u'saml.libertyidentityprovider': {
205
            'Meta': {'object_name': 'LibertyIdentityProvider'},
206
            'authorization_policy': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'authorization_policy'", 'null': 'True', 'to': u"orm['saml.AuthorizationSPPolicy']"}),
207
            'enable_following_authorization_policy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
208
            'enable_following_idp_options_policy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
209
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
210
            'idp_options_policy': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'idp_options_policy'", 'null': 'True', 'to': u"orm['saml.IdPOptionsSPPolicy']"}),
211
            'liberty_provider': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'identity_provider'", 'unique': 'True', 'primary_key': 'True', 'to': u"orm['saml.LibertyProvider']"})
212
        },
213
        u'saml.libertymanagedump': {
214
            'Meta': {'object_name': 'LibertyManageDump'},
215
            'django_session_key': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
216
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
217
            'manage_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'})
218
        },
219
        u'saml.libertyprovider': {
220
            'Meta': {'ordering': "('name',)", 'object_name': 'LibertyProvider'},
221
            'ca_cert_chain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
222
            'entity_id': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '200'}),
223
            'entity_id_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}),
224
            'federation_source': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
225
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
226
            'metadata': ('django.db.models.fields.TextField', [], {}),
227
            'name': ('django.db.models.fields.CharField', [], {'max_length': '140', 'blank': 'True'}),
228
            'protocol_conformance': ('django.db.models.fields.IntegerField', [], {'max_length': '10'}),
229
            'public_key': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
230
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '140'}),
231
            'ssl_certificate': ('django.db.models.fields.TextField', [], {'blank': 'True'})
232
        },
233
        u'saml.libertyproviderpolicy': {
234
            'Meta': {'object_name': 'LibertyProviderPolicy'},
235
            'authn_request_signature_check_hint': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
236
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
237
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'})
238
        },
239
        u'saml.libertyserviceprovider': {
240
            'Meta': {'object_name': 'LibertyServiceProvider'},
241
            'attribute_policy': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_policy'", 'null': 'True', 'to': u"orm['idp.AttributePolicy']"}),
242
            'enable_following_attribute_policy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
243
            'enable_following_sp_options_policy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
244
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
245
            'liberty_provider': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'service_provider'", 'unique': 'True', 'primary_key': 'True', 'to': u"orm['saml.LibertyProvider']"}),
246
            'policy': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': u"orm['saml.LibertyProviderPolicy']", 'null': 'True'}),
247
            'sp_options_policy': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'sp_options_policy'", 'null': 'True', 'to': u"orm['saml.SPOptionsIdPPolicy']"})
248
        },
249
        u'saml.libertysession': {
250
            'Meta': {'object_name': 'LibertySession'},
251
            'assertion': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['saml.LibertyAssertion']", 'null': 'True', 'blank': 'True'}),
252
            'creation': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
253
            'django_session_key': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
254
            'federation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['saml.LibertyFederation']", 'null': 'True', 'blank': 'True'}),
255
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
256
            'name_id_content': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
257
            'name_id_format': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
258
            'name_id_qualifier': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True'}),
259
            'name_id_sp_name_qualifier': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True'}),
260
            'provider_id': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
261
            'session_index': ('django.db.models.fields.CharField', [], {'max_length': '80'})
262
        },
263
        u'saml.libertysessiondump': {
264
            'Meta': {'object_name': 'LibertySessionDump'},
265
            'django_session_key': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
266
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
267
            'kind': ('django.db.models.fields.IntegerField', [], {}),
268
            'session_dump': ('django.db.models.fields.TextField', [], {'blank': 'True'})
269
        },
270
        u'saml.libertysessionsp': {
271
            'Meta': {'object_name': 'LibertySessionSP'},
272
            'django_session_key': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
273
            'federation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['saml.LibertyFederation']"}),
274
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
275
            'session_index': ('django.db.models.fields.CharField', [], {'max_length': '80'})
276
        },
277
        u'saml.samlattribute': {
278
            'Meta': {'object_name': 'SAMLAttribute'},
279
            'attribute_name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
280
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
281
            'friendly_name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
282
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
283
            'name': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
284
            'name_format': ('django.db.models.fields.CharField', [], {'default': "'basic'", 'max_length': '64'}),
285
            'object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
286
        },
287
        u'saml.spoptionsidppolicy': {
288
            'Meta': {'object_name': 'SPOptionsIdPPolicy'},
289
            'accept_slo': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
290
            'accepted_name_id_format': ('authentic2.saml.fields.MultiSelectField', [], {'max_length': '1024', 'blank': 'True'}),
291
            'ask_user_consent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
292
            'authn_request_signed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
293
            'default_name_id_format': ('django.db.models.fields.CharField', [], {'default': "'none'", 'max_length': '256'}),
294
            'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
295
            'encrypt_assertion': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
296
            'encrypt_nameid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
297
            'federation_mode': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
298
            'forward_slo': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
299
            'http_method_for_slo_request': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
300
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
301
            'idp_initiated_sso': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
302
            'iframe_logout_timeout': ('django.db.models.fields.PositiveIntegerField', [], {'default': '300'}),
303
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
304
            'needs_iframe_logout': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
305
            'prefered_assertion_consumer_binding': ('django.db.models.fields.CharField', [], {'default': "'meta'", 'max_length': '4'})
306
        }
307
    }
308

  
309
    complete_apps = ['saml']
0
-