✨ Feature / Metadata validation — scaffolding + spec-conformance rules#20
Merged
✨ Feature / Metadata validation — scaffolding + spec-conformance rules#20
Conversation
Introduce ExSaml.Metadata.validate/1,2 and ExSaml.Metadata.ValidationResult, the first slice of the metadata-validation effort tracked in #17. This slice covers structural and SAML 2.0 spec-conformance checks only. Every finding is an :error; best-practice warnings, strict mode, and certificate linting land in follow-up PRs. Rules: :invalid_xml, :invalid_root_element, :entities_descriptor_not_supported, :missing_entity_id, :entity_id_too_long, :missing_role_descriptor, :missing_saml2_protocol_support, :missing_acs, :missing_sso_service, :invalid_acs_binding, :missing_http_post_acs, :duplicate_acs_index, :multiple_default_acs, :invalid_slo_binding. XML parsing reuses the XXE-safe xmerl_scan configuration introduced in 48b6fca (allow_entities: false, namespace_conformant: true).
Actalab
approved these changes
Apr 24, 2026
This was referenced Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First slice of the metadata-validation effort tracked in #17 (PR 1 of the PLAN).
ExSaml.Metadata.validate/1,2andExSaml.Metadata.ValidationResult— a structured report of violations, with:ok/:errorreturn semantics and an:ignoreoption.:errorseverity::invalid_xml,:invalid_root_element,:entities_descriptor_not_supported,:missing_entity_id,:entity_id_too_long,:missing_role_descriptor,:missing_saml2_protocol_support,:missing_acs,:missing_sso_service,:invalid_acs_binding,:missing_http_post_acs,:duplicate_acs_index,:multiple_default_acs,:invalid_slo_binding.:xmerl_scanconfiguration introduced in 48b6fca (allow_entities: false,namespace_conformant: true).credoto 1.7.18 (latest).Best-practice warnings, strict mode, and certificate linting are deferred to follow-up PRs per the #17 PLAN.
Out of scope for this PR
:allow_http_endpoints,:cert_min_remaining_days— PR 3.:entity_id_domain_checkopt-in — PR 4.Test plan
mix test— 145/145 passing (20 new intest/ex_saml/metadata_test.exs).mix format --check-formatted— clean.mix credo --strict— no issues.mix sobelow— clean.mix deps.unlock --check-unused— clean.mix dialyzer— passed.Closes part of #17 (PR 1 of 5).