From 458baf2c721749b6055638ee00e9d3ff451d6552 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Wed, 24 May 2023 18:27:08 +0000 Subject: [PATCH] feat(firebaseappcheck): update the api #### firebaseappcheck:v1 The following keys were added: - resources.projects.resources.apps.methods.exchangeSafetyNetToken.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.safetyNetConfig.methods.batchGet.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.safetyNetConfig.methods.get.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.safetyNetConfig.methods.patch.deprecated (Total Keys: 1) #### firebaseappcheck:v1beta The following keys were added: - resources.projects.methods.verifyAppCheckToken (Total Keys: 12) - resources.projects.resources.apps.methods.exchangeRecaptchaToken.deprecated (Total Keys: 1) - resources.projects.resources.apps.methods.exchangeSafetyNetToken.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.recaptchaConfig.methods.batchGet.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.recaptchaConfig.methods.get.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.recaptchaConfig.methods.patch.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.safetyNetConfig.methods.batchGet.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.safetyNetConfig.methods.get.deprecated (Total Keys: 1) - resources.projects.resources.apps.resources.safetyNetConfig.methods.patch.deprecated (Total Keys: 1) - schemas.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest (Total Keys: 3) - schemas.GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse (Total Keys: 3) --- .../dyn/firebaseappcheck_v1beta.projects.html | 29 +++++++++ .../documents/firebaseappcheck.v1.json | 6 +- .../documents/firebaseappcheck.v1beta.json | 63 ++++++++++++++++++- 3 files changed, 96 insertions(+), 2 deletions(-) diff --git a/docs/dyn/firebaseappcheck_v1beta.projects.html b/docs/dyn/firebaseappcheck_v1beta.projects.html index bca36f3fa9a..147d6d1419f 100644 --- a/docs/dyn/firebaseappcheck_v1beta.projects.html +++ b/docs/dyn/firebaseappcheck_v1beta.projects.html @@ -87,10 +87,39 @@

Instance Methods

close()

Close httplib2 connections.

+

+ verifyAppCheckToken(project, body=None, x__xgafv=None)

+

Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check).

Method Details

close()
Close httplib2 connections.
+
+ verifyAppCheckToken(project, body=None, x__xgafv=None) +
Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check).
+
+Args:
+  project: string, Required. The relative resource name of the project for which the token was minted, in the format: ``` projects/{project_number} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for the VerifyAppCheckToken method.
+  "appCheckToken": "A String", # Required. The App Check token to verify. App Check tokens exchanged from the SafetyNet provider are not supported; an HTTP 400 error will be returned.
+}
+
+  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 the VerifyAppCheckToken method.
+  "alreadyConsumed": True or False, # Whether this token was already consumed. If this is the first time this method has seen the given App Check token, this field will be omitted from the response. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response containing this field, regardless whether the token was already consumed.
+}
+
+ \ No newline at end of file diff --git a/googleapiclient/discovery_cache/documents/firebaseappcheck.v1.json b/googleapiclient/discovery_cache/documents/firebaseappcheck.v1.json index e9d3a9dc919..843c98c3016 100644 --- a/googleapiclient/discovery_cache/documents/firebaseappcheck.v1.json +++ b/googleapiclient/discovery_cache/documents/firebaseappcheck.v1.json @@ -375,6 +375,7 @@ ] }, "exchangeSafetyNetToken": { + "deprecated": true, "description": "Validates a [SafetyNet token](https://developer.android.com/training/safetynet/attestation#request-attestation-step). If valid, returns an AppCheckToken.", "flatPath": "v1/projects/{projectsId}/apps/{appsId}:exchangeSafetyNetToken", "httpMethod": "POST", @@ -1108,6 +1109,7 @@ "safetyNetConfig": { "methods": { "batchGet": { + "deprecated": true, "description": "Atomically gets the SafetyNetConfigs for the specified list of apps.", "flatPath": "v1/projects/{projectsId}/apps/-/safetyNetConfig:batchGet", "httpMethod": "GET", @@ -1140,6 +1142,7 @@ ] }, "get": { + "deprecated": true, "description": "Gets the SafetyNetConfig for the specified app.", "flatPath": "v1/projects/{projectsId}/apps/{appsId}/safetyNetConfig", "httpMethod": "GET", @@ -1166,6 +1169,7 @@ ] }, "patch": { + "deprecated": true, "description": "Updates the SafetyNetConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange SafetyNet tokens for App Check tokens.", "flatPath": "v1/projects/{projectsId}/apps/{appsId}/safetyNetConfig", "httpMethod": "PATCH", @@ -1338,7 +1342,7 @@ } } }, - "revision": "20230410", + "revision": "20230515", "rootUrl": "https://firebaseappcheck.googleapis.com/", "schemas": { "GoogleFirebaseAppcheckV1AppAttestConfig": { diff --git a/googleapiclient/discovery_cache/documents/firebaseappcheck.v1beta.json b/googleapiclient/discovery_cache/documents/firebaseappcheck.v1beta.json index 3a6e20f7c66..9b8bd998231 100644 --- a/googleapiclient/discovery_cache/documents/firebaseappcheck.v1beta.json +++ b/googleapiclient/discovery_cache/documents/firebaseappcheck.v1beta.json @@ -139,6 +139,37 @@ } }, "projects": { + "methods": { + "verifyAppCheckToken": { + "description": "Verifies the given App Check token and returns token usage signals that callers may act upon. This method currently only supports App Check tokens exchanged from the following attestation providers: * Play Integrity API * App Attest * DeviceCheck (`DCDevice` tokens) * reCAPTCHA Enterprise * reCAPTCHA v3 * Custom providers App Check tokens exchanged from debug secrets are also supported. Calling this method on an otherwise valid App Check token with an unsupported provider will cause an HTTP 400 error to be returned. Returns whether this token was already consumed before this call. If this is the first time this method has seen the given App Check token, the field `already_consumed` in the response will be absent. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response object, regardless whether the token was already consumed. Currently, when evaluating whether an App Check token was already consumed, only calls to this exact method are counted. Use of the App Check token elsewhere will not mark the token as being already consumed. The caller must have the [`firebaseappcheck.appCheckTokens.verify`](https://firebase.google.com/docs/projects/iam/permissions#app-check) permission to call this method. This permission is part of the [Firebase App Check Token Verifier role](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-check).", + "flatPath": "v1beta/projects/{projectsId}:verifyAppCheckToken", + "httpMethod": "POST", + "id": "firebaseappcheck.projects.verifyAppCheckToken", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Required. The relative resource name of the project for which the token was minted, in the format: ``` projects/{project_number} ``` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+project}:verifyAppCheckToken", + "request": { + "$ref": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest" + }, + "response": { + "$ref": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + } + }, "resources": { "apps": { "methods": { @@ -346,6 +377,7 @@ ] }, "exchangeRecaptchaToken": { + "deprecated": true, "description": "Validates a [reCAPTCHA v3 response token](https://developers.google.com/recaptcha/docs/v3). If valid, returns an AppCheckToken.", "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}:exchangeRecaptchaToken", "httpMethod": "POST", @@ -404,6 +436,7 @@ ] }, "exchangeSafetyNetToken": { + "deprecated": true, "description": "Validates a [SafetyNet token](https://developer.android.com/training/safetynet/attestation#request-attestation-step). If valid, returns an AppCheckToken.", "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}:exchangeSafetyNetToken", "httpMethod": "POST", @@ -943,6 +976,7 @@ "recaptchaConfig": { "methods": { "batchGet": { + "deprecated": true, "description": "Atomically gets the RecaptchaConfigs for the specified list of apps. For security reasons, the `site_secret` field is never populated in the response.", "flatPath": "v1beta/projects/{projectsId}/apps/-/recaptchaConfig:batchGet", "httpMethod": "GET", @@ -975,6 +1009,7 @@ ] }, "get": { + "deprecated": true, "description": "Gets the RecaptchaConfig for the specified app. For security reasons, the `site_secret` field is never populated in the response.", "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/recaptchaConfig", "httpMethod": "GET", @@ -1001,6 +1036,7 @@ ] }, "patch": { + "deprecated": true, "description": "Updates the RecaptchaConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange reCAPTCHA tokens for App Check tokens. For security reasons, the `site_secret` field is never populated in the response.", "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/recaptchaConfig", "httpMethod": "PATCH", @@ -1234,6 +1270,7 @@ "safetyNetConfig": { "methods": { "batchGet": { + "deprecated": true, "description": "Atomically gets the SafetyNetConfigs for the specified list of apps.", "flatPath": "v1beta/projects/{projectsId}/apps/-/safetyNetConfig:batchGet", "httpMethod": "GET", @@ -1266,6 +1303,7 @@ ] }, "get": { + "deprecated": true, "description": "Gets the SafetyNetConfig for the specified app.", "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/safetyNetConfig", "httpMethod": "GET", @@ -1292,6 +1330,7 @@ ] }, "patch": { + "deprecated": true, "description": "Updates the SafetyNetConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange SafetyNet tokens for App Check tokens.", "flatPath": "v1beta/projects/{projectsId}/apps/{appsId}/safetyNetConfig", "httpMethod": "PATCH", @@ -1464,7 +1503,7 @@ } } }, - "revision": "20230410", + "revision": "20230515", "rootUrl": "https://firebaseappcheck.googleapis.com/", "schemas": { "GoogleFirebaseAppcheckV1betaAppAttestConfig": { @@ -2119,6 +2158,28 @@ }, "type": "object" }, + "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest": { + "description": "Request message for the VerifyAppCheckToken method.", + "id": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenRequest", + "properties": { + "appCheckToken": { + "description": "Required. The App Check token to verify. App Check tokens exchanged from the SafetyNet provider are not supported; an HTTP 400 error will be returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse": { + "description": "Response message for the VerifyAppCheckToken method.", + "id": "GoogleFirebaseAppcheckV1betaVerifyAppCheckTokenResponse", + "properties": { + "alreadyConsumed": { + "description": "Whether this token was already consumed. If this is the first time this method has seen the given App Check token, this field will be omitted from the response. The given token will then be marked as `already_consumed` (set to `true`) for all future invocations of this method for that token. Note that if the given App Check token is invalid, an HTTP 403 error is returned instead of a response containing this field, regardless whether the token was already consumed.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleProtobufEmpty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty",