providers/saml: fix signing_kp typo
This commit is contained in:
parent
2c4dcb9cf0
commit
f2119ce567
|
@ -24,7 +24,7 @@ class SAMLProviderSerializer(ModelSerializer):
|
|||
"property_mappings",
|
||||
"digest_algorithm",
|
||||
"signature_algorithm",
|
||||
"singing_kp",
|
||||
"signing_kp",
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class SAMLProviderForm(forms.ModelForm):
|
|||
"property_mappings",
|
||||
"digest_algorithm",
|
||||
"signature_algorithm",
|
||||
"singing_kp",
|
||||
"signing_kp",
|
||||
]
|
||||
widgets = {
|
||||
"name": forms.TextInput(),
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# Generated by Django 3.0.3 on 2020-03-05 16:06
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("passbook_providers_saml", "0007_auto_20200303_2157"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name="samlprovider", old_name="singing_kp", new_name="signing_kp",
|
||||
),
|
||||
]
|
|
@ -75,7 +75,7 @@ class SAMLProvider(Provider):
|
|||
default="rsa-sha256",
|
||||
)
|
||||
|
||||
singing_kp = models.ForeignKey(
|
||||
signing_kp = models.ForeignKey(
|
||||
CertificateKeyPair,
|
||||
default=None,
|
||||
null=True,
|
||||
|
|
|
@ -33,10 +33,10 @@ def sign_with_signxml(data: str, provider: "SAMLProvider", reference_uri=None) -
|
|||
signed = signer.sign(
|
||||
root,
|
||||
key=key,
|
||||
cert=[provider.singing_kp.certificate_data],
|
||||
cert=[provider.signing_kp.certificate_data],
|
||||
reference_uri=reference_uri,
|
||||
)
|
||||
XMLVerifier().verify(signed, x509_cert=provider.singing_kp.certificate_data)
|
||||
XMLVerifier().verify(signed, x509_cert=provider.signing_kp.certificate_data)
|
||||
return etree.tostring(signed).decode("utf-8") # nosec
|
||||
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ class DescriptorDownloadView(AccessRequiredView):
|
|||
)
|
||||
)
|
||||
pubkey = strip_pem_header(
|
||||
provider.singing_kp.certificate_data.replace("\r", "")
|
||||
provider.signing_kp.certificate_data.replace("\r", "")
|
||||
).replace("\n", "")
|
||||
subject_format = provider.processor.subject_format
|
||||
ctx = {
|
||||
|
|
Reference in New Issue