Upload an Android assetlinks.json file
To help you integrate your Android apps with PingOne Advanced Identity Cloud, you can upload an assetlinks.json file
to a tenant environment and access it through a custom domain associated with the environment. You
can do this for each custom domain in your set of environments.
As the configuration in your upper environments is immutable, you can only modify the content of
an assetlinks.json file in your development environment configuration. You must then promote any
configuration changes to your upper environments.
Ensure you have set up a
custom domain for
each environment and realm where you need to upload an assetlinks.json file.
|
High-level process
The high-level process to configure and promote an assetlinks.json file is as follows:
-
In your development environment, use the endpoint naming format
/openidm/config/fidc/assetlinks.<custom-domain-fqdn>to setassetlinks.jsoncontent in your configuration with an association to a custom domain. For example, for the custom domainid.mycompany.com, use the endpoint/openidm/config/fidc/assetlinks.id.mycompany.com. -
Promote the configuration to the upper environment that’s configured to use the custom domain; for example, if your production environment is configured to use the custom domain, you will need to promote to your staging environment, and then promote again to your production environment.
-
Access the
assetlinks.jsonfile from your custom domain using the endpoint/.well-known/assetlinks.json; for example, for the custom domainid.mycompany.com, use the URL https://id.mycompany.com/.well-known/assetlinks.json.
View an assetlinks.json file
Use a custom domain to view an assetlinks.json file. You don’t need to use an access token as
the file is publicly accessible.
Show request
$ curl \
--request GET 'https://<custom-domain-fqdn>/.well-known/assetlinks.json'(1)
| 1 | Replace <custom-domain-fqdn> with a custom domain, for example id.mycompany.com. |
Show response
{
"relation": [
"delegate_permission/common.handle_all_urls",
"delegate_permission/common.get_login_creds"
],
"target": {
"namespace": "web",
"site": "https://id.mycompany.com"
}
}
Upload or replace an assetlinks.json file
-
Refer to the High-level process for configuring and promoting an
assetlinks.jsonfile. -
In your development environment:
-
Set the
assetlinks.jsonfile contents in your configuration:Show request
$ curl \ --request PUT 'https://<tenant-env-fqdn>/openidm/config/fidc/assetlinks.<custom-domain-fqdn>' \(1) (2) --header 'Authorization: Bearer <access-token>' \(3) --header 'Content-Type: application/json' \ --data-raw '{(4) "data": [ { "relation": [ "delegate_permission/common.handle_all_urls", "delegate_permission/common.get_login_creds" ], "target": { "namespace": "web", "site": "https://id.mycompany.com" } } ] }'1 Replace <tenant-env-fqdn> with the domain of your development environment; for example, openam-mycompany.forgeblocks.com.2 Replace <custom-domain-fqdn> with the custom domain, for example id.mycompany.com.3 Replace <access-token> with the access token. 4 Replace the example assetlinks.jsonJSON content with your own JSON content. Note that the JSON content is wrapped in adataobject wrapper.Show response
{ "_id": "fidc/assetlinks.id.mycompany.com", "data": [ { "relation": [ "delegate_permission/common.handle_all_urls", "delegate_permission/common.get_login_creds" ], "target": { "namespace": "web", "site": "https://id.mycompany.com" } } ] } -
(Optional) Repeat the previous step for each additional custom domain that needs the
assetlinks.jsonfile uploading or replacing.
-
Run a series of promotions to add the development environment configuration to your upper environments. Learn more in:
-
Use your custom domain to view the assetlinks.json file. If you uploaded or replaced additional
assetlinks.jsonfiles, repeat this for each custom domain.
Delete an assetlinks.json file
-
Refer to the High-level process for configuring and promoting an
assetlinks.jsonfile. -
In your development environment:
-
Delete the
assetlinks.jsonfile contents from your configuration:Show request
$ curl \ --request DELETE 'https://<tenant-env-fqdn>/openidm/config/fidc/assetlinks.<custom-domain-fqdn>' \(1) (2) --header 'Authorization: Bearer <access-token>'(3)1 Replace <tenant-env-fqdn> with the domain of your development environment, for example openam-mycompany.forgeblocks.com.2 Replace <custom-domain-fqdn> with your custom domain, for example id.mycompany.com.3 Replace <access-token> with the access token. Show response
{ "_id": "fidc/assetlinks.id.mycompany.com", "data": [ { "relation": [ "delegate_permission/common.handle_all_urls", "delegate_permission/common.get_login_creds" ], "target": { "namespace": "web", "site": "https://id.mycompany.com" } } ] } -
(Optional) Repeat the previous step for each additional custom domain that needs the
assetlinks.jsonfile deleting.
-
Run a series of promotions to add the development environment configuration to your upper environments. Learn more in:
-
Use your custom domain to view the assetlinks.json file and check that it is empty. If you deleted additional
assetlinks.jsonfiles, repeat this for each custom domain.