|
1 | 1 | # Secrets Protection
|
2 |
| -You should use this option if you wish to protect access to 3rd party or managed APIs where you are not able to add an Approov token check to the backend. This allows client secrets, or API keys, used for access to be protected with Approov. Rather than build secrets into an app where they might be reverse engineered, they are only provided at runtime by Approov for apps that pass attestation. This substantially improves your protection and prevents these secrets being abused by attackers. Where you are able to modify the backend we recommend you use API Protection for further enchanced flexibility and security. |
| 2 | +You should use this option if you wish to protect access to 3rd party or managed APIs where you are not able to add an Approov token check to the backend. This allows client secrets, or API keys, used for access to be protected with Approov. Rather than build secrets into an app where they might be reverse engineered, they are only provided at runtime by Approov for apps that pass attestation. This substantially improves your protection and prevents these secrets being abused by attackers. Where you are able to modify the backend we recommend you use API Protection for further enhanced flexibility and security. |
3 | 3 |
|
4 | 4 | This quickstart provides straightforward implementation if the secret is currently supplied in a request header to the API. The quickstart interceptor is able to automatically rewrite headers as the requests are being made, to automatically substitute in the secret, but only if the app has passed the Approov attestation checks. If the app fails its checks then you can add a custom [rejection](#handling-rejections) handler.
|
5 | 5 |
|
6 | 6 | These additional steps require access to the [Approov CLI](https://approov.io/docs/latest/approov-cli-tool-reference/), please follow the [Installation](https://approov.io/docs/latest/approov-installation/) instructions.
|
7 | 7 |
|
8 | 8 | ## ENABLING MANAGED TRUST ROOTS
|
9 |
| -Client secrets or API keys also need to be protected in transit. For 3rd party APIs you should not pin against their certificates since you are not in control of when they might changed. Instead the [Managed Trust Roots](https://approov.io/docs/latest/approov-usage-documentation/#managed-trust-roots) feature can be used to protect TLS. |
| 9 | +Client secrets or API keys also need to be protected in transit. For 3rd party APIs you should not pin against their certificates since you are not in control of when they might be changed. Instead the [Managed Trust Roots](https://approov.io/docs/latest/approov-usage-documentation/#managed-trust-roots) feature can be used to protect TLS. |
10 | 10 |
|
11 | 11 | Ensure managed trust roots are enabled using:
|
12 | 12 |
|
@@ -56,7 +56,7 @@ If the secret value is provided on the header `your-header` then it is necessary
|
56 | 56 | ApproovService.addSubstitutionHeader("your-header", null)
|
57 | 57 | ```
|
58 | 58 |
|
59 |
| -With this in place the Approov interceptor should replace `your-placeholder` with the `your-secret` as required when the app passes attestation. Since the mapping lookup is performed on the placeholder value you have the flexibility of providing different secrets on different API calls, even if they passed with the same header name. |
| 59 | +With this in place the Approov interceptor should replace `your-placeholder` with the `your-secret` as required when the app passes attestation. Since the mapping lookup is performed on the placeholder value you have the flexibility of providing different secrets on different API calls, even if they are passed with the same header name. |
60 | 60 |
|
61 | 61 | You can see a [worked example](https://github.com/approov/quickstart-android-kotlin-retrofit/blob/master/SHAPES-EXAMPLE.md#shapes-app-with-secrets-protection) for the Shapes app.
|
62 | 62 |
|
@@ -149,7 +149,7 @@ to lookup a secure string with the given `key`, returning `null` if it is not de
|
149 | 149 | This method is also useful for providing runtime secrets protection when the values are not passed on headers. Secure strings set using this method may also be looked up using subsequent networking interceptor header substitutions.
|
150 | 150 |
|
151 | 151 | ### Prefetching
|
152 |
| -If you wish to reduce the latency associated with substituting the first secret, then make this call immediately after creating `ApproovService`: |
| 152 | +If you wish to reduce the latency associated with substituting the first secret, then make this call immediately after initializing `ApproovService`: |
153 | 153 |
|
154 | 154 | ```kotlin
|
155 | 155 | ApproovService.prefetch()
|
|
0 commit comments