ws-federation implementation in Apex
To get started:
- Install this package ( https://login.salesforce.com/packaging/installPackage.apexp?p0=04ti00000008ezm ), or create the code from the Apex, and Pages directory, plus the required custom object
- Adjust CRUD and FLS
- Generate encoded keys / certs, follow the cryptocommands in the Keys directory. When asked for a password, use something consistent for each answer. Run the 5 commands and you'll end up with key.pem, which is your encodedPrivateKey ( protect this!! ), wsfed.crt which is your public certificate, and your modulus / exponent
- You need to get just the base64 from the cert and the key and remove all line breaks
- Go to /apex/WSFederationManagement and create a Realm
Now, you can authorize access to the WSFederation page via Profiles or Permsets and it will speak WSFed Passive profile
Consult this wiki for example intructions with Sharepoint: [https://developer.salesforce.com/page/Configuring-SSO-to-SharePoint]