Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

Shin Workbook

shin_notebook.livemd

Shin Workbook

Mix.install([{:shin, ">= 0.2.0"}])
alias Shin.{Metadata, Attributes}

1. Defining an IdP

You’ll need to change the URL to the base URL of your own IdP service. You’ll need access to the admin endpoints (by default this is done with an IP address allow-list)

{:ok, idp} = Shin.idp("https://idp.university.ac.uk/idp")

2. Getting raw metrics information

{:ok, metrics} = Shin.metrics(idp)

Producing a simplified report


{:ok, report} = Shin.report(idp, :system_info)
IO.puts report.cores

Triggering a service reload


{:ok, message} = Shin.reload_service(idp, "shibboleth.AttributeFilterService")

Listing a user’s attribute data released to an SP

{:ok, attr_data} = Shin.attributes(idp, "https://test.ukfederation.org.uk/entity", "pete")
Shin.Attributes.values(attr_data, "eduPersonEntitlement")

Viewing a simulated SAML2 assertion containing user attributes

{:ok, saml_assertion_xml} = Shin.assertion(idp, "https://test.ukfederation.org.uk/entity", "pete")

Fetching an SP’s metadata

{:ok, metadata_xml} = Shin.metadata(idp, "https://test.ukfederation.org.uk/entity")