# Setting up MIRACL Trust SSO as an Identity Provider Within Dropbox

These instructions are up-to-date at the time of writing, but you should refer back to the Dropbox page on SAML IdP access to check for any changes. We cannot guarantee the accuracy of our SP-specific guidance.

  1. Log in to your Dropbox for Business account.

  2. Click on Admin Console. The ‘Dropbox Admin Console’ is launched in a new browser tab.

  3. Click on Settings. The following page is displayed: Settings

  4. Click on Single sign-on.


  5. Select Required.

  6. Set the Sign in URL as the https://<myssoip>/sso endpoint on your IdP server. If you are running a local test it is

  7. Upload your X.509 certificate. To do this you can just upload the public certificate generated earlier - (idp.crt) in the command given above. This file is in newline format and begins with -----BEGIN CERTIFICATE----- and ends with -----END CERTIFICATE-----. Dropbox also receives certificates in .pem format.

# Configuring a Dropbox Service Provider Profile With MIRACL Trust SSO

  1. Edit /etc/miracl-sso/service_providers/dropbox.yaml:

        description: Dropbox is a cloud storage provider
        name: My storage provider
        relay_state: ""
        login_url: https://www.dropbox.com/login
        logout_url: https://www.dropbox.com/logout
        metadata: >-
          <?xml version="1.0" encoding="UTF-8"?>
          <!-- dropbox doesnt provide a link to download its sp metadata, so this is hand-crafted -->
          <md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="Dropbox">
            <md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
              <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://www.dropbox.com/saml_login" index="0"/>
        sign_response: true
        sign_assertion: false
        encrypt_assertion: false
        - - email: ^[^@]+@example.com$
          nameid: email
  2. Note that the name under which the SP is registered in the sp section is used to create your IdP-initiated login url, i.e. https://<yourssoip>/login/dropbox.

  3. login_url and logout_url are the standard SP URLs which Dropbox makes available for SAML IdPs to use.

  4. Do not make any changes to the SP metadata. It is handcrafted for Dropbox.

    Note that, if you are using JSON format for your config file, the handcrafted metadata should be saved as an xml file and converted to a single line with the " characters escaped with \ to meet json structure requirements. This can be achieved by running the following command on the handcrafted metadata.xml file:

    echo -e "\n"$(cat metadata.xml | tr -d '\n' | sed -E 's/"/\\"/g')"\n"

    The contents then are output in the terminal in a format that can be pasted into the metadata field of a JSON file.

  5. In the authorize subsection, you can control what users are allowed to attempt login by following one or both of the below steps:

    • Call up an LDAP setup from an ldap.yaml file stored in /etc/miracl-sso/integrations.
    • Configure a regex list of email addresses/domains. The above config shows an example of how you would use email: ^[^@]+@example.com$" to only allow users from a certain email domain to login.

    Note that if this is not set correctly, you receive ‘unauthorized user’ messages.

    For more detailed info on using LDAP, API and/or regex to control authorized users, please see the authorization menu section.

  6. Save and close the file.

  7. In your /etc/miracl-sso/config.yaml file make sure you add dropbox.yaml to the list of ‘includes’:

      - core.yaml
    # service providers
      - service_providers/dropbox.yaml
  8. As always after config changes, restart the server.

  9. Now your service is configured, you can visit https://<yourssoip>/login/dropbox or https://<yourssoip>/services to login to the service using IdP-initiated login, or visit the Dropbox login page and SP-initiated login are triggered automatically.

  10. You are able to login using the in-browser PIN pad or with the MIRACL Trust app. When logging in to your SSO service for the first time you are asked to register an email address so as to confirm your identity and register you as a user.