LMS integration
Cheat sheet for wiring this IdP into bizlibrary.login / LMS local dev.
Full detail (DB row shape, prerequisites, known chaos-mode gaps) lives in
docs/integration-targets.md in this repo.
The two-hop flow
SAML terminates in bizlibrary.login, never in LMS. LMS obtains
identity from bizlibrary.login over an authorization-code exchange, so this
IdP only ever talks to the login app.
- browser → LMS
GET /Account/Login - LMS → browser
302redirect to its own/OAuth/Authorize - browser → bizlibrary.login (SP) follows the redirect to
/OAuth/Authorize - SP (internal) not signed in → redirects to
/SAML/RequestAuthentication - SP → this IdP
AuthnRequest(redirect binding, via the browser) - user authenticates at this IdP
- this IdP → browser auto-submitting POST form carrying the
SAMLResponse - browser → SP
POST /SAML/Consume - SP (internal) validates the response, signs the user in, sets the
.bizlauth.logincookie - SP → browser → LMS
302back through/OAuth/Authorizewith an authorization code - LMS → SP
POST /OAuth/GetOAuthToken(server-to-server, no browser) - SP → LMS
access_token
This IdP's live SAML endpoints
These are read from the running config, so they stay correct if PUBLIC_BASE_URL
or ports change.
- IdP entity ID
- urn:test-idp:idp
- SSO / AuthnRequest endpoint
- https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/sso
- SLO / logout endpoint
- https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/slo
- Metadata
- https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/metadata
- Signing certificate
- https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/certificate.cer (
.cerfile, not the metadata XML) - Signing cert fingerprint
- 92:CC:F9:FE:3F:78:28:66:18:49:42:28:09:34:CB:82:F2:A8:85:34:84:6D:1F:84:D9:EE:34:27:E6:47:4F:A4
Registered here as an SP
registered
BizlLogin -> http://localhost:5555/SAML/Consume
on Service providers.
Assertion signed: true,
response signed: false,
attribute preset: simple.
Register with BizlLogin (bizl2)
BizlLogin resolves its SAML IdP from the AuthenticationMethod table, scoped to a
tenant via Look → LookAuthenticationMethod. For local/sandbox dev
that tenant is bizl2 (Look.Name = 'bizl2', LookKey = 4351).
Whenever this IdP redeploys to a new URL, run this against BizlLogin's dev DB
(companycollege80_DEV, via SSMS/sqlcmd) so the tenant points at the endpoints
above.
BEGIN TRANSACTION;
INSERT INTO AuthenticationMethod
(Title, Type, Active, SyncGuid, ClientKey, Configuration, CreatedBy, CreatedDate, ModifiedBy, ModifiedDate)
VALUES
(N'TestIdp', N'SAML', 1, N'40200ED9-2D7F-41B6-B5D0-5EE2364DA025', NULL,
N'{"IdpName":"urn:test-idp:idp","EntityId":"https://lms.bizlibrary.com/SAML/40200ed9-2d7f-41b6-b5d0-5ee2364da025","IdpAuthnRequestEndPoint":"https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/sso","IdpLogoutEndpoint":"https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/slo","CertificateName":"signing-certificate.cer","NameIdFormat":"urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress","ProvisionUsers":false,"ProvisionUsersDisabledMessage":"","AuthnResponseBodySigned":false,"AssertionSigned":false,"AssertionEncrypted":false,"AssertionAttributes":[{"Name":"username","Mapping":"username"}],"errors":[]}',
N'dev-sandbox', SYSUTCDATETIME(), NULL, SYSUTCDATETIME());
INSERT INTO LookAuthenticationMethod (LookKey, AuthenticationMethodId)
VALUES (4351, SCOPE_IDENTITY());
COMMIT TRANSACTION;
What to paste into bizlibrary.login / LMS's Admin > Authentication
This is the AuthenticationMethod.Configuration JSON blob (same shape LMS's
_AuthenticationConfig.cshtml form writes). Signing is left off so the round trip
works before wiring up certificates โ see the note below to turn it on.
{
"IdpName": "urn:test-idp:idp",
"EntityId": "BizlLogin",
"IdpAuthnRequestEndPoint": "https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/sso",
"IdpLogoutEndpoint": "https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/slo",
"NameIdFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
"ProvisionUsers": false,
"ProvisionUsersDisabledMessage": "Unknown user - contact an administrator",
"AuthnResponseBodySigned": false,
"AssertionSigned": false,
"AssertionEncrypted": false,
"AssertionAttributes": [
{
"Name": "username",
"Mapping": "username"
}
]
}
Field-by-field mapping for the Authentication form
| LMS admin form field | Value |
|---|---|
| Authentication Method Title | anything, e.g. Test IdP (local) |
| IDP Name | urn:test-idp:idp |
| IDP Authentication Request Endpoint | https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/sso |
| IDP Logout Endpoint | https://te-346877f799a749b6a36474bdfd68b4cd.ecs.us-east-1.on.aws/saml/slo |
| Name Id Format | match whatever the registered SP requests (unspecified unless changed on Service providers) |
| Provision Users | your call — on to JIT-create unknown users, off to require they already exist |
| Response / Assertion is Signed | leave both off until the signing cert (below) is uploaded, then flip on to test signature handling |
| Signing Certificate | download signing-certificate.cer (a real .cer file — the metadata XML link is rejected by LMS's uploader, which only accepts .pfx/.p12/.cer/.cert), then upload it through the form |
| Assertion Attributes | username → mapped to UserName (the form's dropdown only offers username/email/company/firstname/lastname — use the simple attribute preset on this IdP's side so names line up) |