Skip to content

Commit

Permalink
feat(firebaseappcheck): update the api
Browse files Browse the repository at this point in the history
#### firebaseappcheck:v1beta

The following keys were added:
- resources.projects.resources.apps.methods.exchangeAppAttestAssertion (Total Keys: 12)
- resources.projects.resources.apps.methods.exchangeAppAttestAttestation (Total Keys: 12)
- resources.projects.resources.apps.methods.generateAppAttestChallenge (Total Keys: 12)
- schemas.GoogleFirebaseAppcheckV1betaAppAttestChallengeResponse (Total Keys: 6)
- schemas.GoogleFirebaseAppcheckV1betaExchangeAppAttestAssertionRequest (Total Keys: 8)
- schemas.GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationRequest (Total Keys: 8)
- schemas.GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse (Total Keys: 5)
  • Loading branch information
yoshi-automation committed Jun 29, 2021
1 parent 16327aa commit 9a0131b
Show file tree
Hide file tree
Showing 2 changed files with 267 additions and 1 deletion.
96 changes: 96 additions & 0 deletions docs/dyn/firebaseappcheck_v1beta.projects.apps.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#exchangeAppAttestAssertion">exchangeAppAttestAssertion(app, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Accepts a AppAttest Artifact and Assertion, and uses the developer's preconfigured auth token to verify the token with Apple. Returns an AttestationToken with the App ID as specified by the `app` field included as attested claims.</p>
<p class="toc_element">
<code><a href="#exchangeAppAttestAttestation">exchangeAppAttestAttestation(app, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Accepts a AppAttest CBOR Attestation, and uses the developer's preconfigured team and bundle IDs to verify the token with Apple. Returns an Attestation Artifact that can later be exchanged for an AttestationToken in ExchangeAppAttestAssertion.</p>
<p class="toc_element">
<code><a href="#exchangeCustomToken">exchangeCustomToken(app, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Validates a custom token signed using your project's Admin SDK service account credentials. If valid, returns an App Check token encapsulated in an AttestationTokenResponse.</p>
Expand All @@ -107,12 +113,76 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#exchangeSafetyNetToken">exchangeSafetyNetToken(app, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Validates a [SafetyNet token](https://developer.android.com/training/safetynet/attestation#request-attestation-step). If valid, returns an App Check token encapsulated in an AttestationTokenResponse.</p>
<p class="toc_element">
<code><a href="#generateAppAttestChallenge">generateAppAttestChallenge(app, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Initiates the App Attest flow by generating a challenge which will be used as a type of nonce for this attestation.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>

<div class="method">
<code class="details" id="exchangeAppAttestAssertion">exchangeAppAttestAssertion(app, body=None, x__xgafv=None)</code>
<pre>Accepts a AppAttest Artifact and Assertion, and uses the developer&#x27;s preconfigured auth token to verify the token with Apple. Returns an AttestationToken with the App ID as specified by the `app` field included as attested claims.

Args:
app: string, Required. The full resource name to the iOS App. Format: &quot;projects/{project_id}/apps/{app_id}&quot; (required)
body: object, The request body.
The object takes the form of:

{ # Request message for ExchangeAppAttestAssertion
&quot;artifact&quot;: &quot;A String&quot;, # The artifact previously returned by ExchangeAppAttestAttestation.
&quot;assertion&quot;: &quot;A String&quot;, # The CBOR encoded assertion provided by the Apple App Attest SDK.
&quot;challenge&quot;: &quot;A String&quot;, # A one time challenge returned by GenerateAppAttestChallenge.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Encapsulates an *App Check token*, which are used to access Firebase services protected by App Check.
&quot;attestationToken&quot;: &quot;A String&quot;, # An App Check token. App Check tokens are signed [JWTs](https://tools.ietf.org/html/rfc7519) containing claims that identify the attested app and Firebase project. This token is used to access Firebase services protected by App Check.
&quot;ttl&quot;: &quot;A String&quot;, # The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration.
}</pre>
</div>

<div class="method">
<code class="details" id="exchangeAppAttestAttestation">exchangeAppAttestAttestation(app, body=None, x__xgafv=None)</code>
<pre>Accepts a AppAttest CBOR Attestation, and uses the developer&#x27;s preconfigured team and bundle IDs to verify the token with Apple. Returns an Attestation Artifact that can later be exchanged for an AttestationToken in ExchangeAppAttestAssertion.

Args:
app: string, Required. The full resource name to the iOS App. Format: &quot;projects/{project_id}/apps/{app_id}&quot; (required)
body: object, The request body.
The object takes the form of:

{ # Request message for ExchangeAppAttestAttestation
&quot;attestationStatement&quot;: &quot;A String&quot;, # The App Attest statement as returned by Apple&#x27;s client-side App Attest API. This is the CBOR object returned by Apple, which will be Base64 encoded in the JSON API.
&quot;challenge&quot;: &quot;A String&quot;, # The challenge previously generated by the FAC backend.
&quot;keyId&quot;: &quot;A String&quot;, # The key ID generated by App Attest for the client app.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response message for ExchangeAppAttestAttestation
&quot;artifact&quot;: &quot;A String&quot;, # An artifact that should be passed back during the Assertion flow.
&quot;attestationToken&quot;: { # Encapsulates an *App Check token*, which are used to access Firebase services protected by App Check. # An attestation token which can be used to access Firebase APIs.
&quot;attestationToken&quot;: &quot;A String&quot;, # An App Check token. App Check tokens are signed [JWTs](https://tools.ietf.org/html/rfc7519) containing claims that identify the attested app and Firebase project. This token is used to access Firebase services protected by App Check.
&quot;ttl&quot;: &quot;A String&quot;, # The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration.
},
}</pre>
</div>

<div class="method">
<code class="details" id="exchangeCustomToken">exchangeCustomToken(app, body=None, x__xgafv=None)</code>
<pre>Validates a custom token signed using your project&#x27;s Admin SDK service account credentials. If valid, returns an App Check token encapsulated in an AttestationTokenResponse.
Expand Down Expand Up @@ -248,4 +318,30 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="generateAppAttestChallenge">generateAppAttestChallenge(app, body=None, x__xgafv=None)</code>
<pre>Initiates the App Attest flow by generating a challenge which will be used as a type of nonce for this attestation.

Args:
app: string, Required. The full resource name to the iOS App. Format: &quot;projects/{project_id}/apps/{app_id}&quot; (required)
body: object, The request body.
The object takes the form of:

{ # Request message for GenerateAppAttestChallenge
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response object for GenerateAppAttestChallenge
&quot;challenge&quot;: &quot;A String&quot;, # A one time use challenge for the client to pass to Apple&#x27;s App Attest API.
&quot;ttl&quot;: &quot;A String&quot;, # The duration from the time this challenge is minted until it is expired. This field is intended to ease client-side token management, since the device may have clock skew, but is still able to accurately measure a duration. This expiration is intended to minimize the replay window within which a single challenge may be reused. See AIP 142 for naming of this field.
}</pre>
</div>

</body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,64 @@
"resources": {
"apps": {
"methods": {
"exchangeAppAttestAssertion": {
"description": "Accepts a AppAttest Artifact and Assertion, and uses the developer's preconfigured auth token to verify the token with Apple. Returns an AttestationToken with the App ID as specified by the `app` field included as attested claims.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}:exchangeAppAttestAssertion",
"httpMethod": "POST",
"id": "firebaseappcheck.projects.apps.exchangeAppAttestAssertion",
"parameterOrder": [
"app"
],
"parameters": {
"app": {
"description": "Required. The full resource name to the iOS App. Format: \"projects/{project_id}/apps/{app_id}\"",
"location": "path",
"pattern": "^projects/[^/]+/apps/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1beta/{+app}:exchangeAppAttestAssertion",
"request": {
"$ref": "GoogleFirebaseAppcheckV1betaExchangeAppAttestAssertionRequest"
},
"response": {
"$ref": "GoogleFirebaseAppcheckV1betaAttestationTokenResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"
]
},
"exchangeAppAttestAttestation": {
"description": "Accepts a AppAttest CBOR Attestation, and uses the developer's preconfigured team and bundle IDs to verify the token with Apple. Returns an Attestation Artifact that can later be exchanged for an AttestationToken in ExchangeAppAttestAssertion.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}:exchangeAppAttestAttestation",
"httpMethod": "POST",
"id": "firebaseappcheck.projects.apps.exchangeAppAttestAttestation",
"parameterOrder": [
"app"
],
"parameters": {
"app": {
"description": "Required. The full resource name to the iOS App. Format: \"projects/{project_id}/apps/{app_id}\"",
"location": "path",
"pattern": "^projects/[^/]+/apps/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1beta/{+app}:exchangeAppAttestAttestation",
"request": {
"$ref": "GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationRequest"
},
"response": {
"$ref": "GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"
]
},
"exchangeCustomToken": {
"description": "Validates a custom token signed using your project's Admin SDK service account credentials. If valid, returns an App Check token encapsulated in an AttestationTokenResponse.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}:exchangeCustomToken",
Expand Down Expand Up @@ -286,6 +344,35 @@
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"
]
},
"generateAppAttestChallenge": {
"description": "Initiates the App Attest flow by generating a challenge which will be used as a type of nonce for this attestation.",
"flatPath": "v1beta/projects/{projectsId}/apps/{appsId}:generateAppAttestChallenge",
"httpMethod": "POST",
"id": "firebaseappcheck.projects.apps.generateAppAttestChallenge",
"parameterOrder": [
"app"
],
"parameters": {
"app": {
"description": "Required. The full resource name to the iOS App. Format: \"projects/{project_id}/apps/{app_id}\"",
"location": "path",
"pattern": "^projects/[^/]+/apps/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1beta/{+app}:generateAppAttestChallenge",
"request": {
"$ref": "GoogleFirebaseAppcheckV1betaGenerateAppAttestChallengeRequest"
},
"response": {
"$ref": "GoogleFirebaseAppcheckV1betaAppAttestChallengeResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/firebase"
]
}
},
"resources": {
Expand Down Expand Up @@ -776,9 +863,26 @@
}
}
},
"revision": "20210611",
"revision": "20210621",
"rootUrl": "https://firebaseappcheck.googleapis.com/",
"schemas": {
"GoogleFirebaseAppcheckV1betaAppAttestChallengeResponse": {
"description": "Response object for GenerateAppAttestChallenge",
"id": "GoogleFirebaseAppcheckV1betaAppAttestChallengeResponse",
"properties": {
"challenge": {
"description": "A one time use challenge for the client to pass to Apple's App Attest API.",
"format": "byte",
"type": "string"
},
"ttl": {
"description": "The duration from the time this challenge is minted until it is expired. This field is intended to ease client-side token management, since the device may have clock skew, but is still able to accurately measure a duration. This expiration is intended to minimize the replay window within which a single challenge may be reused. See AIP 142 for naming of this field.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaAttestationTokenResponse": {
"description": "Encapsulates an *App Check token*, which are used to access Firebase services protected by App Check.",
"id": "GoogleFirebaseAppcheckV1betaAttestationTokenResponse",
Expand Down Expand Up @@ -899,6 +1003,66 @@
},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaExchangeAppAttestAssertionRequest": {
"description": "Request message for ExchangeAppAttestAssertion",
"id": "GoogleFirebaseAppcheckV1betaExchangeAppAttestAssertionRequest",
"properties": {
"artifact": {
"description": "The artifact previously returned by ExchangeAppAttestAttestation.",
"format": "byte",
"type": "string"
},
"assertion": {
"description": "The CBOR encoded assertion provided by the Apple App Attest SDK.",
"format": "byte",
"type": "string"
},
"challenge": {
"description": "A one time challenge returned by GenerateAppAttestChallenge.",
"format": "byte",
"type": "string"
}
},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationRequest": {
"description": "Request message for ExchangeAppAttestAttestation",
"id": "GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationRequest",
"properties": {
"attestationStatement": {
"description": "The App Attest statement as returned by Apple's client-side App Attest API. This is the CBOR object returned by Apple, which will be Base64 encoded in the JSON API.",
"format": "byte",
"type": "string"
},
"challenge": {
"description": "The challenge previously generated by the FAC backend.",
"format": "byte",
"type": "string"
},
"keyId": {
"description": "The key ID generated by App Attest for the client app.",
"format": "byte",
"type": "string"
}
},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse": {
"description": "Response message for ExchangeAppAttestAttestation",
"id": "GoogleFirebaseAppcheckV1betaExchangeAppAttestAttestationResponse",
"properties": {
"artifact": {
"description": "An artifact that should be passed back during the Assertion flow.",
"format": "byte",
"type": "string"
},
"attestationToken": {
"$ref": "GoogleFirebaseAppcheckV1betaAttestationTokenResponse",
"description": "An attestation token which can be used to access Firebase APIs."
}
},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaExchangeCustomTokenRequest": {
"description": "Request message for the ExchangeCustomToken method.",
"id": "GoogleFirebaseAppcheckV1betaExchangeCustomTokenRequest",
Expand Down Expand Up @@ -954,6 +1118,12 @@
},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaGenerateAppAttestChallengeRequest": {
"description": "Request message for GenerateAppAttestChallenge",
"id": "GoogleFirebaseAppcheckV1betaGenerateAppAttestChallengeRequest",
"properties": {},
"type": "object"
},
"GoogleFirebaseAppcheckV1betaListDebugTokensResponse": {
"description": "Response message for the ListDebugTokens method.",
"id": "GoogleFirebaseAppcheckV1betaListDebugTokensResponse",
Expand Down

0 comments on commit 9a0131b

Please sign in to comment.