Skip to content

Commit cdf3091

Browse files
daymxnemilypgoogle
authored andcommitted
[FAL] Update limited-use token docs (#7299)
Per [b/440356335](https://b.corp.google.com/issues/440356335), This updates the limited-use token related docs to point to the web page that will go live with the release. Initially, it was planned for the docs to go live when Unity released, but Rachel now intends to have them live immediately -- with a note about Unity until they go live. The updates are made per Rachel's recommendations and discussions in the javadoc CL/ALF doc.
1 parent 85889de commit cdf3091

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

firebase-ai/CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
configured.
88
* [changed] Added a `dilation` parameter to `ImagenMaskReference.generateMaskAndPadForOutpainting`
99
(#7260)
10-
* [feature] Added a new configuration option to enable limited-use App Check tokens for attesting
11-
Firebase AI Logic requests. This enhances security against replay attacks. To use this feature,
12-
configure it explicitly via the new `useLimitedUseAppCheckTokens` parameter when initializing
13-
`FirebaseAI`. We recommend migrating to limited-use tokens now, so your app will be ready to take
14-
advantage of replay protection when it becomes available for Firebase AI Logic.
10+
* [feature] Added support for limited-use tokens with Firebase App Check. These short-lived tokens
11+
provide greater protection for the APIs that give you access to Gemini and Imagen models. Learn
12+
how to [enable usage of limited-use tokens](https://firebase.google.com/docs/ai-logic/app-check).
13+
(#7285)
14+
1515

1616
# 17.1.0
1717
=======

firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -231,22 +231,12 @@ internal constructor(
231231
*
232232
* @param backend the backend reference to make generative AI requests to.
233233
* @param useLimitedUseAppCheckTokens when sending tokens to the backend, this option enables
234-
* the usage of App Check's limited-use tokens instead of the standard cached tokens.
235-
*
236-
* A new limited-use tokens will be generated for each request; providing a smaller attack
237-
* surface for malicious parties to hijack tokens. When used alongside replay protection,
238-
* limited-use tokens are also _consumed_ after each request, ensuring they can't be used again.
234+
* the usage of App Check's limited-use tokens instead of the standard cached tokens. Learn more
235+
* about [limited-use tokens](https://firebase.google.com/docs/ai-logic/app-check), including
236+
* their nuances, when to use them, and best practices for integrating them into your app.
239237
*
240238
* _This flag is set to `false` by default._
241-
*
242-
* **Important:** Replay protection is not currently supported for the FirebaseAI backend. While
243-
* this feature is being developed, you can still migrate to using limited-use tokens. Because
244-
* limited-use tokens are backwards compatible, you can still use them without replay
245-
* protection. Due to their shorter TTL over standard App Check tokens, they still provide a
246-
* security benefit. Migrating to limited-use tokens sooner minimizes disruption when support
247-
* for replay protection is added.
248239
*/
249-
// TODO(b/440356335): Update docs above when web page goes live in M170
250240
@JvmStatic
251241
@JvmOverloads
252242
public fun getInstance(
@@ -290,7 +280,9 @@ public fun Firebase.ai(
290280
*
291281
* @param backend the backend reference to make generative AI requests to.
292282
* @param useLimitedUseAppCheckTokens use App Check's limited-use tokens when sending requests to
293-
* the backend. To learn more about what this means, see the full docs on [FirebaseAI.getInstance].
283+
* the backend. Learn more about
284+
* [limited-use tokens](https://firebase.google.com/docs/ai-logic/app-check), including their
285+
* nuances, when to use them, and best practices for integrating them into your app.
294286
*/
295287
// TODO(b/440356335): Update docs above when web page goes live in M170
296288
public fun Firebase.ai(

0 commit comments

Comments
 (0)