mirror of
https://github.com/gravitational/teleport.git
synced 2026-09-19 11:00:37 +08:00
* Add `Beam` resource protobuf definition * Add beams backend service * Fix test and lint failures * Delete all beam alias leases on `DeleteAllBeams` * Apply PR feedback * Restructure beam storage service Following comments on the PR and a Slack conversation with Edorado, this commit restructures the storage service interface to reflect how it'll actually be used. For example, we now write the beam and its supporting resources in one atomic operation, rather than lots of little fallible writes. It also incorporates other feedback such as adding a field to track the provision state of the actual beam VM. * Use `types.GetExpiry` helper to avoid protobuf epoch issues * Fix linting errors * Store `DelegationSession` with beam resources Also remove duplicate `itemFromWorkloadIdentity` definition * Remove cross-service dependency Following @espadolini's comment, the `BeamService` is no longer responsible for writing the actual node, app, token, etc. records to the backend. Instead, those services expose `AppendPut*Actions` and `AppendDelete*Actions` methods and it's the caller's responsibility to call `Backend.AtomicWrite` with them. * Move `Append*Actions` methods to "internal" service interfaces * Fix test errors in tests * Store users without secrets * Rename user methods for clarity about what's included or not * Fix accidental cache usage * Fix broken reference from master * Do not set an expiry on beam alias In case the alias gets reassigned before the original beam is cleaned up