Enterprise B2B SAML 2.0 SP AuthnRequest & signed Assertion verifier, OIDC JWKS keyset matcher, and SCIM 2.0 /Users & /Groups provisioning.
Pure-Veko Enterprise Single Sign-On (SSO): OASIS SAML 2.0 Service Provider (AuthnRequest, EntityDescriptor, W3C XML-DSig verification over Ed25519 / ECDSA P-256 / RSA-PSS), OpenID Connect Discovery & JWKS, and RFC 7643 / RFC 7644 SCIM 2.0 Directory Provisioning (ldap_saml, ldap_saml/scim).
ldap_saml equips Veko services with enterprise identity federation and automated user lifecycle provisioning:
ldap_saml (SAML 2.0 & OIDC / JWKS):SP): build-authn-request (generates OASIS samlp:AuthnRequest XML, compresses via raw RFC 1951 DEFLATE, Base64-encodes, and builds the HTTP-Redirect URL), build-sp-metadata (md:EntityDescriptor XML), sign-test-saml-response (in-memory signed IdP fixture generator), and verify-saml-response.verify-saml-response enforces single-Assertion XML Signature Wrapping (XSW) defense, constant-time SHA-256 DigestValue verification over the enveloped-signature-stripped <saml:Assertion>, cryptographic SignatureValue verification over <ds:SignedInfo> (Ed25519, ECDSA P-256, RSA-PSS SHA-256), InResponseTo + seen_ids replay prevention, NotBefore/NotOnOrAfter window checks, and AudienceRestriction.build-oidc-configuration, jwk-from-ed25519 (RFC 8037 OKP), jwk-from-p256 (RFC 7517 EC), select-jwk-by-kid, and validate-id-token-claims (iss, aud, exp, nbf, nonce).ldap_saml/scim (RFC 7643 / RFC 7644 SCIM 2.0):User, Group, ListResponse, and Error (application/scim+json) schema codecs.emails.value co "@acme.io", userName eq "ada@acme.io"), eq, ne, co, sw, ew, pr, gt, ge, lt, le, and, or, not, and ( ... ).PatchOp engine (add, replace, remove, pathless Okta/Entra object replacement, and filtered multi-valued removal) plus ScimDirectory mountable directly on web/App (/scim/v2/Users, /scim/v2/Groups).veko pkg add ldap_saml@1.0.0Import the modules in .vk source files:
use [
sso = ldap_saml
scim = ldap_saml/scim
]SAMLResponse and validate <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/>.<saml:Assertion> and reject payloads containing multiple Assertion elements (XML Signature Wrapping defense).<ds:Reference URI="#<AssertionID>">, strip <ds:Signature>, compute SHA-256 over the canonical <saml:Assertion>, and compare in constant time (bits/ct-eq?) against <ds:DigestValue>.<ds:SignatureValue> over <ds:SignedInfo> using crypto/x25519 (Ed25519) or crypto/sig (ECDSA P-256 / RSA-PSS).Issuer == sp.idp_entity_id, Audience == sp.entity_id, InResponseTo, seen_ids replay cache, and NotBefore <= now < NotOnOrAfter (with sp.clock_skew_sec).ldap_samlSpConfig, AuthnRequestBundle, SamlPrincipalbuild-authn-request [sp SpConfig, request_id str, issue_instant str /relay-state relay str = ''] AuthnRequestBundleinflate-authn-request [deflated_b64 str] strbuild-sp-metadata [sp SpConfig] strverify-saml-response [sp SpConfig, saml_response_b64 str /expected-req-id req_id str = '' /now-sec now i64 = -1 /seen-ids cache any = .none] SamlPrincipalsign-test-saml-response [idp_entity_id str, sp_entity_id str, acs_url str, in_response_to str, name_id str, not_before str, not_on_or_after str, attributes map, alg str, signing_key bytes ...] strbuild-oidc-configuration [issuer str] mapjwk-from-ed25519 [kid str, pubkey32 bytes] mapjwk-from-p256 [kid str, pubkey65 bytes] mapselect-jwk-by-kid [jwks map, kid str] mapvalidate-id-token-claims [claims map, expected_iss str, expected_aud str, expected_nonce str /now-sec now i64 = -1 /leeway skew i64 = 30] enumldap_saml/scimSCHEMA-USER, SCHEMA-GROUP, SCHEMA-LIST, SCHEMA-PATCH, SCHEMA-ERROR, SCIM-CONTENT-TYPEnormalize-user [raw map, id str, base_url str /created ts str = ''] mapnormalize-group [raw map, id str, base_url str /created ts str = ''] mapencode-list-response [resources block, total_results i64, start_index i64, items_per_page i64] mapencode-scim-error [status i64, detail str /scim-type stype str = ''] mapparse-scim-filter [expr str] map / eval-scim-filter [ast map, resource map] bool / matches-scim-filter? [expr str, resource map] boolapply-patch-op [resource map, patch_body map] mapnew-directory [/base-url url str = ... /bearer-token tok str = ''] ScimDirectorymount-directory [mut app web/App, dir ScimDirectory /prefix pfx str = '/scim/v2'] enumuse [scim = ldap_saml/scim, web]
mut app = web/new-app
dir = scim/new-directory/bearer-token 'okta-scim-bearer-secret'
_ = scim/mount-directory mut app dir
// Evaluate SCIM 2.0 filter directly against a User resource
matched = scim/matches-scim-filter? 'active eq true and emails.value co "@acme.io"' {
userName = 'ada@acme.io'
active = true
emails = [{ value = 'ada@acme.io', primary = true }]
}
println matched // truehttps://veko-lang.org/pkg/ldap_saml/1.0.0.vkp8fe1e062e9ed10e8033be62a80146c60ef3a50e059782f24abdc93104e97786422fecd5a8e834c3c7ec194d7b81251a0b85ec7b4064d2b0d470111bd7a0baab6ed25519:27406074d8681da1d4e6420f5d887cac15c313334c249ac047ba9d4e2df72b70{"name":"ldap_saml","version":"1.0.0","tier":4.0,"tier_label":"Tier 4: FinTech, GraphQL, CDP & SSO","category":"SAML 2.0, OIDC JWKS & SCIM 2.0","description":"Enterprise B2B SAML 2.0 SP AuthnRequest & signed Assertion verifier, OIDC JWKS keyset matcher, and SCIM 2.0 /Users & /Groups provisioning.","modules":["ldap_saml","ldap_saml/scim"],"homepage":"https://veko-lang.org/packages/ldap_saml"}| Bundle Entry Path | Size | Leaf SHA-256 Digest |
|---|---|---|
| README.md | 5 KB | b39b109f8c6afdb9acfe474499648422160e95ddd4810ac2fd6f7b45da5f095a |
| examples/demo.vk | 9 KB | 1cb1fdb243ff9eb54a4b7070908559564ed473e568e8009b84b98e7f824e3a79 |
| mod.vk | 27 KB | 7571672e8387c1963d8d4799d67db15660ce509e5559cf3eb659185f86828e53 |
| scim.vk | 25 KB | 956ecf74699943c969970abd96d0feea8ef1b1261d6e643cfb1f301c19898800 |