Current section
16 Versions
Jump to
Current section
16 Versions
Compare versions
12
files changed
+40
additions
-392
deletions
| @@ -6,19 +6,19 @@ | |
| 6 6 | {<<"files">>, |
| 7 7 | [<<"lib">>,<<"lib/google_api">>,<<"lib/google_api/digital_asset_links">>, |
| 8 8 | <<"lib/google_api/digital_asset_links/v1">>, |
| 9 | - <<"lib/google_api/digital_asset_links/v1/connection.ex">>, |
| 9 | + <<"lib/google_api/digital_asset_links/v1/model">>, |
| 10 | + <<"lib/google_api/digital_asset_links/v1/model/web_asset.ex">>, |
| 11 | + <<"lib/google_api/digital_asset_links/v1/model/android_app_asset.ex">>, |
| 12 | + <<"lib/google_api/digital_asset_links/v1/model/statement.ex">>, |
| 13 | + <<"lib/google_api/digital_asset_links/v1/model/check_response.ex">>, |
| 14 | + <<"lib/google_api/digital_asset_links/v1/model/asset.ex">>, |
| 15 | + <<"lib/google_api/digital_asset_links/v1/model/certificate_info.ex">>, |
| 16 | + <<"lib/google_api/digital_asset_links/v1/model/list_response.ex">>, |
| 17 | + <<"lib/google_api/digital_asset_links/v1/metadata.ex">>, |
| 10 18 | <<"lib/google_api/digital_asset_links/v1/api">>, |
| 11 19 | <<"lib/google_api/digital_asset_links/v1/api/assetlinks.ex">>, |
| 12 20 | <<"lib/google_api/digital_asset_links/v1/api/statements.ex">>, |
| 13 | - <<"lib/google_api/digital_asset_links/v1/model">>, |
| 14 | - <<"lib/google_api/digital_asset_links/v1/model/certificate_info.ex">>, |
| 15 | - <<"lib/google_api/digital_asset_links/v1/model/asset.ex">>, |
| 16 | - <<"lib/google_api/digital_asset_links/v1/model/statement.ex">>, |
| 17 | - <<"lib/google_api/digital_asset_links/v1/model/web_asset.ex">>, |
| 18 | - <<"lib/google_api/digital_asset_links/v1/model/check_response.ex">>, |
| 19 | - <<"lib/google_api/digital_asset_links/v1/model/android_app_asset.ex">>, |
| 20 | - <<"lib/google_api/digital_asset_links/v1/model/list_response.ex">>, |
| 21 | - <<"lib/google_api/digital_asset_links/v1/metadata.ex">>,<<"mix.exs">>, |
| 21 | + <<"lib/google_api/digital_asset_links/v1/connection.ex">>,<<"mix.exs">>, |
| 22 22 | <<"README.md">>,<<"LICENSE">>]}. |
| 23 23 | {<<"licenses">>,[<<"Apache 2.0">>]}. |
| 24 24 | {<<"links">>, |
| @@ -32,4 +32,4 @@ | |
| 32 32 | {<<"optional">>,false}, |
| 33 33 | {<<"repository">>,<<"hexpm">>}, |
| 34 34 | {<<"requirement">>,<<"~> 0.4">>}]]}. |
| 35 | - {<<"version">>,<<"0.9.0">>}. |
| 35 | + {<<"version">>,<<"0.9.1">>}. |
| @@ -26,29 +26,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Assetlinks do | |
| 26 26 | @library_version Mix.Project.config() |> Keyword.get(:version, "") |
| 27 27 | |
| 28 28 | @doc """ |
| 29 | - Determines whether the specified (directional) relationship exists between |
| 30 | - the specified source and target assets. |
| 31 | - |
| 32 | - The relation describes the intent of the link between the two assets as |
| 33 | - claimed by the source asset. An example for such relationships is the |
| 34 | - delegation of privileges or permissions. |
| 35 | - |
| 36 | - This command is most often used by infrastructure systems to check |
| 37 | - preconditions for an action. For example, a client may want to know if it |
| 38 | - is OK to send a web URL to a particular mobile app instead. The client can |
| 39 | - check for the relevant asset link from the website to the mobile app to |
| 40 | - decide if the operation should be allowed. |
| 41 | - |
| 42 | - A note about security: if you specify a secure asset as the source, such as |
| 43 | - an HTTPS website or an Android app, the API will ensure that any |
| 44 | - statements used to generate the response have been made in a secure way by |
| 45 | - the owner of that asset. Conversely, if the source asset is an insecure |
| 46 | - HTTP website (that is, the URL starts with `http://` instead of |
| 47 | - `https://`), the API cannot verify its statements securely, and it is not |
| 48 | - possible to ensure that the website's statements have not been altered by a |
| 49 | - third party. For more information, see the [Digital Asset Links technical |
| 50 | - design |
| 51 | - specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md). |
| 29 | + Determines whether the specified (directional) relationship exists between the specified source and target assets. The relation describes the intent of the link between the two assets as claimed by the source asset. An example for such relationships is the delegation of privileges or permissions. This command is most often used by infrastructure systems to check preconditions for an action. For example, a client may want to know if it is OK to send a web URL to a particular mobile app instead. The client can check for the relevant asset link from the website to the mobile app to decide if the operation should be allowed. A note about security: if you specify a secure asset as the source, such as an HTTPS website or an Android app, the API will ensure that any statements used to generate the response have been made in a secure way by the owner of that asset. Conversely, if the source asset is an insecure HTTP website (that is, the URL starts with `http://` instead of `https://`), the API cannot verify its statements securely, and it is not possible to ensure that the website's statements have not been altered by a third party. For more information, see the [Digital Asset Links technical design specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md). |
| 52 30 | |
| 53 31 | ## Parameters |
| 54 32 | |
| @@ -65,138 +43,13 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Assetlinks do | |
| 65 43 | * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. |
| 66 44 | * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). |
| 67 45 | * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). |
| 68 | - * `:relation` (*type:* `String.t`) - Query string for the relation. |
| 69 | - |
| 70 | - We identify relations with strings of the format `<kind>/<detail>`, where |
| 71 | - `<kind>` must be one of a set of pre-defined purpose categories, and |
| 72 | - `<detail>` is a free-form lowercase alphanumeric string that describes the |
| 73 | - specific use case of the statement. |
| 74 | - |
| 75 | - Refer to [our API documentation](/digital-asset-links/v1/relation-strings) |
| 76 | - for the current list of supported relations. |
| 77 | - |
| 78 | - For a query to match an asset link, both the query's and the asset link's |
| 79 | - relation strings must match exactly. |
| 80 | - |
| 81 | - Example: A query with relation `delegate_permission/common.handle_all_urls` |
| 82 | - matches an asset link with relation |
| 83 | - `delegate_permission/common.handle_all_urls`. |
| 84 | - * `:"source.androidApp.certificate.sha256Fingerprint"` (*type:* `String.t`) - The uppercase SHA-265 fingerprint of the certificate. From the PEM |
| 85 | - certificate, it can be acquired like this: |
| 86 | - |
| 87 | - $ keytool -printcert -file $CERTFILE | grep SHA256: |
| 88 | - SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \\ |
| 89 | - 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 |
| 90 | - |
| 91 | - or like this: |
| 92 | - |
| 93 | - $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256 |
| 94 | - SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \\ |
| 95 | - 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 |
| 96 | - |
| 97 | - In this example, the contents of this field would be `14:6D:E9:83:C5:73: |
| 98 | - 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: |
| 99 | - 44:E5`. |
| 100 | - |
| 101 | - If these tools are not available to you, you can convert the PEM |
| 102 | - certificate into the DER format, compute the SHA-256 hash of that string |
| 103 | - and represent the result as a hexstring (that is, uppercase hexadecimal |
| 104 | - representations of each octet, separated by colons). |
| 105 | - * `:"source.androidApp.packageName"` (*type:* `String.t`) - Android App assets are naturally identified by their Java package name. |
| 106 | - For example, the Google Maps app uses the package name |
| 107 | - `com.google.android.apps.maps`. |
| 108 | - REQUIRED |
| 109 | - * `:"source.web.site"` (*type:* `String.t`) - Web assets are identified by a URL that contains only the scheme, hostname |
| 110 | - and port parts. The format is |
| 111 | - |
| 112 | - http[s]://<hostname>[:<port>] |
| 113 | - |
| 114 | - Hostnames must be fully qualified: they must end in a single period |
| 115 | - ("`.`"). |
| 116 | - |
| 117 | - Only the schemes "http" and "https" are currently allowed. |
| 118 | - |
| 119 | - Port numbers are given as a decimal number, and they must be omitted if the |
| 120 | - standard port numbers are used: 80 for http and 443 for https. |
| 121 | - |
| 122 | - We call this limited URL the "site". All URLs that share the same scheme, |
| 123 | - hostname and port are considered to be a part of the site and thus belong |
| 124 | - to the web asset. |
| 125 | - |
| 126 | - Example: the asset with the site `https://www.google.com` contains all |
| 127 | - these URLs: |
| 128 | - |
| 129 | - * `https://www.google.com/` |
| 130 | - * `https://www.google.com:443/` |
| 131 | - * `https://www.google.com/foo` |
| 132 | - * `https://www.google.com/foo?bar` |
| 133 | - * `https://www.google.com/foo#bar` |
| 134 | - * `https://user@password:www.google.com/` |
| 135 | - |
| 136 | - But it does not contain these URLs: |
| 137 | - |
| 138 | - * `http://www.google.com/` (wrong scheme) |
| 139 | - * `https://google.com/` (hostname does not match) |
| 140 | - * `https://www.google.com:444/` (port does not match) |
| 141 | - REQUIRED |
| 142 | - * `:"target.androidApp.certificate.sha256Fingerprint"` (*type:* `String.t`) - The uppercase SHA-265 fingerprint of the certificate. From the PEM |
| 143 | - certificate, it can be acquired like this: |
| 144 | - |
| 145 | - $ keytool -printcert -file $CERTFILE | grep SHA256: |
| 146 | - SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \\ |
| 147 | - 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 |
| 148 | - |
| 149 | - or like this: |
| 150 | - |
| 151 | - $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256 |
| 152 | - SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \\ |
| 153 | - 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 |
| 154 | - |
| 155 | - In this example, the contents of this field would be `14:6D:E9:83:C5:73: |
| 156 | - 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: |
| 157 | - 44:E5`. |
| 158 | - |
| 159 | - If these tools are not available to you, you can convert the PEM |
| 160 | - certificate into the DER format, compute the SHA-256 hash of that string |
| 161 | - and represent the result as a hexstring (that is, uppercase hexadecimal |
| 162 | - representations of each octet, separated by colons). |
| 163 | - * `:"target.androidApp.packageName"` (*type:* `String.t`) - Android App assets are naturally identified by their Java package name. |
| 164 | - For example, the Google Maps app uses the package name |
| 165 | - `com.google.android.apps.maps`. |
| 166 | - REQUIRED |
| 167 | - * `:"target.web.site"` (*type:* `String.t`) - Web assets are identified by a URL that contains only the scheme, hostname |
| 168 | - and port parts. The format is |
| 169 | - |
| 170 | - http[s]://<hostname>[:<port>] |
| 171 | - |
| 172 | - Hostnames must be fully qualified: they must end in a single period |
| 173 | - ("`.`"). |
| 174 | - |
| 175 | - Only the schemes "http" and "https" are currently allowed. |
| 176 | - |
| 177 | - Port numbers are given as a decimal number, and they must be omitted if the |
| 178 | - standard port numbers are used: 80 for http and 443 for https. |
| 179 | - |
| 180 | - We call this limited URL the "site". All URLs that share the same scheme, |
| 181 | - hostname and port are considered to be a part of the site and thus belong |
| 182 | - to the web asset. |
| 183 | - |
| 184 | - Example: the asset with the site `https://www.google.com` contains all |
| 185 | - these URLs: |
| 186 | - |
| 187 | - * `https://www.google.com/` |
| 188 | - * `https://www.google.com:443/` |
| 189 | - * `https://www.google.com/foo` |
| 190 | - * `https://www.google.com/foo?bar` |
| 191 | - * `https://www.google.com/foo#bar` |
| 192 | - * `https://user@password:www.google.com/` |
| 193 | - |
| 194 | - But it does not contain these URLs: |
| 195 | - |
| 196 | - * `http://www.google.com/` (wrong scheme) |
| 197 | - * `https://google.com/` (hostname does not match) |
| 198 | - * `https://www.google.com:444/` (port does not match) |
| 199 | - REQUIRED |
| 46 | + * `:relation` (*type:* `String.t`) - Query string for the relation. We identify relations with strings of the format `/`, where `` must be one of a set of pre-defined purpose categories, and `` is a free-form lowercase alphanumeric string that describes the specific use case of the statement. Refer to [our API documentation](/digital-asset-links/v1/relation-strings) for the current list of supported relations. For a query to match an asset link, both the query's and the asset link's relation strings must match exactly. Example: A query with relation `delegate_permission/common.handle_all_urls` matches an asset link with relation `delegate_permission/common.handle_all_urls`. |
| 47 | + * `:"source.androidApp.certificate.sha256Fingerprint"` (*type:* `String.t`) - The uppercase SHA-265 fingerprint of the certificate. From the PEM certificate, it can be acquired like this: $ keytool -printcert -file $CERTFILE | grep SHA256: SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \\ 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 or like this: $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256 SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \\ 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 In this example, the contents of this field would be `14:6D:E9:83:C5:73: 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: 44:E5`. If these tools are not available to you, you can convert the PEM certificate into the DER format, compute the SHA-256 hash of that string and represent the result as a hexstring (that is, uppercase hexadecimal representations of each octet, separated by colons). |
| 48 | + * `:"source.androidApp.packageName"` (*type:* `String.t`) - Android App assets are naturally identified by their Java package name. For example, the Google Maps app uses the package name `com.google.android.apps.maps`. REQUIRED |
| 49 | + * `:"source.web.site"` (*type:* `String.t`) - Web assets are identified by a URL that contains only the scheme, hostname and port parts. The format is http[s]://[:] Hostnames must be fully qualified: they must end in a single period ("`.`"). Only the schemes "http" and "https" are currently allowed. Port numbers are given as a decimal number, and they must be omitted if the standard port numbers are used: 80 for http and 443 for https. We call this limited URL the "site". All URLs that share the same scheme, hostname and port are considered to be a part of the site and thus belong to the web asset. Example: the asset with the site `https://www.google.com` contains all these URLs: * `https://www.google.com/` * `https://www.google.com:443/` * `https://www.google.com/foo` * `https://www.google.com/foo?bar` * `https://www.google.com/foo#bar` * `https://user@password:www.google.com/` But it does not contain these URLs: * `http://www.google.com/` (wrong scheme) * `https://google.com/` (hostname does not match) * `https://www.google.com:444/` (port does not match) REQUIRED |
| 50 | + * `:"target.androidApp.certificate.sha256Fingerprint"` (*type:* `String.t`) - The uppercase SHA-265 fingerprint of the certificate. From the PEM certificate, it can be acquired like this: $ keytool -printcert -file $CERTFILE | grep SHA256: SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \\ 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 or like this: $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256 SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \\ 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 In this example, the contents of this field would be `14:6D:E9:83:C5:73: 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: 44:E5`. If these tools are not available to you, you can convert the PEM certificate into the DER format, compute the SHA-256 hash of that string and represent the result as a hexstring (that is, uppercase hexadecimal representations of each octet, separated by colons). |
| 51 | + * `:"target.androidApp.packageName"` (*type:* `String.t`) - Android App assets are naturally identified by their Java package name. For example, the Google Maps app uses the package name `com.google.android.apps.maps`. REQUIRED |
| 52 | + * `:"target.web.site"` (*type:* `String.t`) - Web assets are identified by a URL that contains only the scheme, hostname and port parts. The format is http[s]://[:] Hostnames must be fully qualified: they must end in a single period ("`.`"). Only the schemes "http" and "https" are currently allowed. Port numbers are given as a decimal number, and they must be omitted if the standard port numbers are used: 80 for http and 443 for https. We call this limited URL the "site". All URLs that share the same scheme, hostname and port are considered to be a part of the site and thus belong to the web asset. Example: the asset with the site `https://www.google.com` contains all these URLs: * `https://www.google.com/` * `https://www.google.com:443/` * `https://www.google.com/foo` * `https://www.google.com/foo?bar` * `https://www.google.com/foo#bar` * `https://user@password:www.google.com/` But it does not contain these URLs: * `http://www.google.com/` (wrong scheme) * `https://google.com/` (hostname does not match) * `https://www.google.com:444/` (port does not match) REQUIRED |
| 200 53 | * `opts` (*type:* `keyword()`) - Call options |
| 201 54 | |
| 202 55 | ## Returns |
| @@ -26,23 +26,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Statements do | |
| 26 26 | @library_version Mix.Project.config() |> Keyword.get(:version, "") |
| 27 27 | |
| 28 28 | @doc """ |
| 29 | - Retrieves a list of all statements from a given source that match the |
| 30 | - specified target and statement string. |
| 31 | - |
| 32 | - The API guarantees that all statements with secure source assets, such as |
| 33 | - HTTPS websites or Android apps, have been made in a secure way by the owner |
| 34 | - of those assets, as described in the [Digital Asset Links technical design |
| 35 | - specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md). |
| 36 | - Specifically, you should consider that for insecure websites (that is, |
| 37 | - where the URL starts with `http://` instead of `https://`), this guarantee |
| 38 | - cannot be made. |
| 39 | - |
| 40 | - The `List` command is most useful in cases where the API client wants to |
| 41 | - know all the ways in which two assets are related, or enumerate all the |
| 42 | - relationships from a particular source asset. Example: a feature that |
| 43 | - helps users navigate to related items. When a mobile app is running on a |
| 44 | - device, the feature would make it easy to navigate to the corresponding web |
| 45 | - site or Google+ profile. |
| 29 | + Retrieves a list of all statements from a given source that match the specified target and statement string. The API guarantees that all statements with secure source assets, such as HTTPS websites or Android apps, have been made in a secure way by the owner of those assets, as described in the [Digital Asset Links technical design specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md). Specifically, you should consider that for insecure websites (that is, where the URL starts with `http://` instead of `https://`), this guarantee cannot be made. The `List` command is most useful in cases where the API client wants to know all the ways in which two assets are related, or enumerate all the relationships from a particular source asset. Example: a feature that helps users navigate to related items. When a mobile app is running on a device, the feature would make it easy to navigate to the corresponding web site or Google+ profile. |
| 46 30 | |
| 47 31 | ## Parameters |
| 48 32 | |
| @@ -59,78 +43,10 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Statements do | |
| 59 43 | * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. |
| 60 44 | * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). |
| 61 45 | * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). |
| 62 | - * `:relation` (*type:* `String.t`) - Use only associations that match the specified relation. |
| 63 | - |
| 64 | - See the [`Statement`](#Statement) message for a detailed definition of |
| 65 | - relation strings. |
| 66 | - |
| 67 | - For a query to match a statement, one of the following must be true: |
| 68 | - |
| 69 | - * both the query's and the statement's relation strings match exactly, |
| 70 | - or |
| 71 | - * the query's relation string is empty or missing. |
| 72 | - |
| 73 | - Example: A query with relation `delegate_permission/common.handle_all_urls` |
| 74 | - matches an asset link with relation |
| 75 | - `delegate_permission/common.handle_all_urls`. |
| 76 | - * `:"source.androidApp.certificate.sha256Fingerprint"` (*type:* `String.t`) - The uppercase SHA-265 fingerprint of the certificate. From the PEM |
| 77 | - certificate, it can be acquired like this: |
| 78 | - |
| 79 | - $ keytool -printcert -file $CERTFILE | grep SHA256: |
| 80 | - SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \\ |
| 81 | - 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 |
| 82 | - |
| 83 | - or like this: |
| 84 | - |
| 85 | - $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256 |
| 86 | - SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \\ |
| 87 | - 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 |
| 88 | - |
| 89 | - In this example, the contents of this field would be `14:6D:E9:83:C5:73: |
| 90 | - 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: |
| 91 | - 44:E5`. |
| 92 | - |
| 93 | - If these tools are not available to you, you can convert the PEM |
| 94 | - certificate into the DER format, compute the SHA-256 hash of that string |
| 95 | - and represent the result as a hexstring (that is, uppercase hexadecimal |
| 96 | - representations of each octet, separated by colons). |
| 97 | - * `:"source.androidApp.packageName"` (*type:* `String.t`) - Android App assets are naturally identified by their Java package name. |
| 98 | - For example, the Google Maps app uses the package name |
| 99 | - `com.google.android.apps.maps`. |
| 100 | - REQUIRED |
| 101 | - * `:"source.web.site"` (*type:* `String.t`) - Web assets are identified by a URL that contains only the scheme, hostname |
| 102 | - and port parts. The format is |
| 103 | - |
| 104 | - http[s]://<hostname>[:<port>] |
| 105 | - |
| 106 | - Hostnames must be fully qualified: they must end in a single period |
| 107 | - ("`.`"). |
| 108 | - |
| 109 | - Only the schemes "http" and "https" are currently allowed. |
| 110 | - |
| 111 | - Port numbers are given as a decimal number, and they must be omitted if the |
| 112 | - standard port numbers are used: 80 for http and 443 for https. |
| 113 | - |
| 114 | - We call this limited URL the "site". All URLs that share the same scheme, |
| 115 | - hostname and port are considered to be a part of the site and thus belong |
| 116 | - to the web asset. |
| 117 | - |
| 118 | - Example: the asset with the site `https://www.google.com` contains all |
| 119 | - these URLs: |
| 120 | - |
| 121 | - * `https://www.google.com/` |
| 122 | - * `https://www.google.com:443/` |
| 123 | - * `https://www.google.com/foo` |
| 124 | - * `https://www.google.com/foo?bar` |
| 125 | - * `https://www.google.com/foo#bar` |
| 126 | - * `https://user@password:www.google.com/` |
| 127 | - |
| 128 | - But it does not contain these URLs: |
| 129 | - |
| 130 | - * `http://www.google.com/` (wrong scheme) |
| 131 | - * `https://google.com/` (hostname does not match) |
| 132 | - * `https://www.google.com:444/` (port does not match) |
| 133 | - REQUIRED |
| 46 | + * `:relation` (*type:* `String.t`) - Use only associations that match the specified relation. See the [`Statement`](#Statement) message for a detailed definition of relation strings. For a query to match a statement, one of the following must be true: * both the query's and the statement's relation strings match exactly, or * the query's relation string is empty or missing. Example: A query with relation `delegate_permission/common.handle_all_urls` matches an asset link with relation `delegate_permission/common.handle_all_urls`. |
| 47 | + * `:"source.androidApp.certificate.sha256Fingerprint"` (*type:* `String.t`) - The uppercase SHA-265 fingerprint of the certificate. From the PEM certificate, it can be acquired like this: $ keytool -printcert -file $CERTFILE | grep SHA256: SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \\ 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 or like this: $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256 SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \\ 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 In this example, the contents of this field would be `14:6D:E9:83:C5:73: 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: 44:E5`. If these tools are not available to you, you can convert the PEM certificate into the DER format, compute the SHA-256 hash of that string and represent the result as a hexstring (that is, uppercase hexadecimal representations of each octet, separated by colons). |
| 48 | + * `:"source.androidApp.packageName"` (*type:* `String.t`) - Android App assets are naturally identified by their Java package name. For example, the Google Maps app uses the package name `com.google.android.apps.maps`. REQUIRED |
| 49 | + * `:"source.web.site"` (*type:* `String.t`) - Web assets are identified by a URL that contains only the scheme, hostname and port parts. The format is http[s]://[:] Hostnames must be fully qualified: they must end in a single period ("`.`"). Only the schemes "http" and "https" are currently allowed. Port numbers are given as a decimal number, and they must be omitted if the standard port numbers are used: 80 for http and 443 for https. We call this limited URL the "site". All URLs that share the same scheme, hostname and port are considered to be a part of the site and thus belong to the web asset. Example: the asset with the site `https://www.google.com` contains all these URLs: * `https://www.google.com/` * `https://www.google.com:443/` * `https://www.google.com/foo` * `https://www.google.com/foo?bar` * `https://www.google.com/foo#bar` * `https://user@password:www.google.com/` But it does not contain these URLs: * `http://www.google.com/` (wrong scheme) * `https://google.com/` (hostname does not match) * `https://www.google.com:444/` (port does not match) REQUIRED |
| 134 50 | * `opts` (*type:* `keyword()`) - Call options |
| 135 51 | |
| 136 52 | ## Returns |
| @@ -20,7 +20,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1 do | |
| 20 20 | API client metadata for GoogleApi.DigitalAssetLinks.V1. |
| 21 21 | """ |
| 22 22 | |
| 23 | - @discovery_revision "20200726" |
| 23 | + @discovery_revision "20200829" |
| 24 24 | |
| 25 25 | def discovery_revision(), do: @discovery_revision |
| 26 26 | end |
| @@ -21,25 +21,8 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Model.AndroidAppAsset do | |
| 21 21 | |
| 22 22 | ## Attributes |
| 23 23 | |
| 24 | - * `certificate` (*type:* `GoogleApi.DigitalAssetLinks.V1.Model.CertificateInfo.t`, *default:* `nil`) - Because there is no global enforcement of package name uniqueness, we also |
| 25 | - require a signing certificate, which in combination with the package name |
| 26 | - uniquely identifies an app. |
| 27 | - |
| 28 | - Some apps' signing keys are rotated, so they may be signed by different |
| 29 | - keys over time. We treat these as distinct assets, since we use (package |
| 30 | - name, cert) as the unique ID. This should not normally pose any problems |
| 31 | - as both versions of the app will make the same or similar statements. |
| 32 | - Other assets making statements about the app will have to be updated when a |
| 33 | - key is rotated, however. |
| 34 | - |
| 35 | - (Note that the syntaxes for publishing and querying for statements contain |
| 36 | - syntactic sugar to easily let you specify apps that are known by multiple |
| 37 | - certificates.) |
| 38 | - REQUIRED |
| 39 | - * `packageName` (*type:* `String.t`, *default:* `nil`) - Android App assets are naturally identified by their Java package name. |
| 40 | - For example, the Google Maps app uses the package name |
| 41 | - `com.google.android.apps.maps`. |
| 42 | - REQUIRED |
| 24 | + * `certificate` (*type:* `GoogleApi.DigitalAssetLinks.V1.Model.CertificateInfo.t`, *default:* `nil`) - Because there is no global enforcement of package name uniqueness, we also require a signing certificate, which in combination with the package name uniquely identifies an app. Some apps' signing keys are rotated, so they may be signed by different keys over time. We treat these as distinct assets, since we use (package name, cert) as the unique ID. This should not normally pose any problems as both versions of the app will make the same or similar statements. Other assets making statements about the app will have to be updated when a key is rotated, however. (Note that the syntaxes for publishing and querying for statements contain syntactic sugar to easily let you specify apps that are known by multiple certificates.) REQUIRED |
| 25 | + * `packageName` (*type:* `String.t`, *default:* `nil`) - Android App assets are naturally identified by their Java package name. For example, the Google Maps app uses the package name `com.google.android.apps.maps`. REQUIRED |
| 43 26 | """ |
| 44 27 | |
| 45 28 | use GoogleApi.Gax.ModelBase |
Loading more files…