Automating Importing SAML Users with Rake Tasks

You can automate the process of importing SAML users from a JSON file by editing the faspex.yml file. You must provide the path to a JSON file with the following format:
{"users": [
    { "username": "username", 
    "email": "email_address",
    "given_name": "first_name",
    "saml_configuration_id": saml_config_id },
Attribute Description
Username The Faspex username associated with the SAML user.
Email The email address associated with the account.
Given Name The first name associated with the account.
SAML Configuration ID The ID associated with the SAML configuration. The saml_id specifies the SAML configuration. For example, in the case of multiple SAML configurations, the first configuration is associated with the SAML ID "1", the next configuration "2", and so on.
Note: You must first configure the SAML configuration in Faspex to associate the users with the correct SAML IdP through the SAML ID. For more information on configuring a SAML configuration, see Creating a SAML Configuration in Faspex.
Important: Backup faspex.yml before making your changes. For more information about the faspex.yml file, see Configuring Faspex with faspex.yml.
  1. Edit faspex.yml which can be found at: /opt/aspera/faspex/config/faspex.yml.
    Under the "Production" section, provide the path to a local JSON file or a URL referencing a JSON file. Set the frequency for Faspex to import user data from the JSON file.
        DisableSAMLUserImportBackgroundJob: false
        SAMLUserImportJSONResourceFQN: full_path_of_JSON_file
        SAMLUserImportFrequencyInSeconds: time_in_seconds
  2. Save and restart Faspex processes.
    asctl faspex:restart
Faspex now automatically imports updates you make to the JSON file. Faspex also imports entries for existing SAML users and imports updates the users in Faspex with the new values.