Skip to content

Add support to Firestore backends for custom databases#47540

Merged
rosstimothy merged 1 commit intomasterfrom
tross/firestore_database
Oct 15, 2024
Merged

Add support to Firestore backends for custom databases#47540
rosstimothy merged 1 commit intomasterfrom
tross/firestore_database

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy commented Oct 12, 2024

Firestore has supported multiple databases in a project for a while (see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project), however, Teleport only allowed using the default database in the project. The DatabaseID is now exposed in the file config, and if provided both the state and events backends will use the appropriate database.

Closes #37227.

Changelog: Allow using a custom database for Firestore backends.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-hn42zvvvy-goteleport.vercel.app/docs/ver/preview

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-kp4sn5vmc-goteleport.vercel.app/docs/ver/preview

@rosstimothy rosstimothy changed the title Adds support to Firestore backends for custom databases Add support to Firestore backends for custom databases Oct 14, 2024
@rosstimothy rosstimothy marked this pull request as ready for review October 14, 2024 09:53
@github-actions github-actions Bot added audit-log Issues related to Teleports Audit Log documentation size/sm labels Oct 14, 2024
Copy link
Copy Markdown
Contributor

@espadolini espadolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The admin client is used to create indices, but the "parent" parameter in the ensureIndexes methods on firestoreevents.Log and firestorebk.Backend is "projects/" + l.ProjectID + "/databases/(default)/collectionGroups/" + l.CollectionName and won't refer to the specified database.

Changing this also sort of suggests that we should either be urlencoding those or prohibit slashes in the parameter.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-fzoexdw6e-goteleport.vercel.app/docs/ver/preview

Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-r1xf9oz8p-goteleport.vercel.app/docs/ver/preview

@rosstimothy rosstimothy enabled auto-merge October 15, 2024 16:31
@rosstimothy rosstimothy added this pull request to the merge queue Oct 15, 2024
Merged via the queue into master with commit 4366faf Oct 15, 2024
@rosstimothy rosstimothy deleted the tross/firestore_database branch October 15, 2024 17:11
@public-teleport-github-review-bot
Copy link
Copy Markdown

@rosstimothy See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Failed
branch/v16 Failed

rosstimothy added a commit that referenced this pull request Oct 15, 2024
Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
rosstimothy added a commit that referenced this pull request Oct 15, 2024
Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
rosstimothy added a commit that referenced this pull request Oct 15, 2024
Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
rosstimothy added a commit that referenced this pull request Oct 15, 2024
Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
rosstimothy added a commit that referenced this pull request Oct 15, 2024
Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
rosstimothy added a commit that referenced this pull request Oct 15, 2024
Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
mvbrock pushed a commit that referenced this pull request Oct 16, 2024
Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 16, 2024
)

Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 16, 2024
)

Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 16, 2024
)

Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 16, 2024
)

Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 17, 2024
)

Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
github-merge-queue Bot pushed a commit that referenced this pull request Oct 17, 2024
)

Firestore has supported multiple databases in a project for a while
(see https://cloud.google.com/blog/products/databases/manage-multiple-firestore-databases-in-a-project),
however, Teleport only allowed using the default database in the project.
The DatabaseID is now exposed in the file config, and if provided
both the state and events backends will use the appropriate database.

Closes #37227.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit-log Issues related to Teleports Audit Log documentation size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for selecting a non-default Firestore database in the project

3 participants