mirror of
https://github.com/coder/coder.git
synced 2025-06-28 04:33:02 +00:00
feat: Add agent authentication based on instance ID (#336)
* feat: Add agent authentication based on instance ID Each cloud has it's own unique instance identity signatures, which can be used for zero-token authentication. This change adds support for tracking by "instance_id", and automatically authenticating with Google Cloud. * Add test for CLI * Fix workspace agent request name * Fix race with adding to wait group * Fix name of instance identity token
This commit is contained in:
@ -14,7 +14,7 @@ func TestPostFiles(t *testing.T) {
|
||||
t.Parallel()
|
||||
t.Run("BadContentType", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
client := coderdtest.New(t)
|
||||
client := coderdtest.New(t, nil)
|
||||
_ = coderdtest.CreateInitialUser(t, client)
|
||||
_, err := client.UploadFile(context.Background(), "bad", []byte{'a'})
|
||||
require.Error(t, err)
|
||||
@ -22,7 +22,7 @@ func TestPostFiles(t *testing.T) {
|
||||
|
||||
t.Run("Insert", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
client := coderdtest.New(t)
|
||||
client := coderdtest.New(t, nil)
|
||||
_ = coderdtest.CreateInitialUser(t, client)
|
||||
_, err := client.UploadFile(context.Background(), codersdk.ContentTypeTar, make([]byte, 1024))
|
||||
require.NoError(t, err)
|
||||
@ -30,7 +30,7 @@ func TestPostFiles(t *testing.T) {
|
||||
|
||||
t.Run("InsertAlreadyExists", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
client := coderdtest.New(t)
|
||||
client := coderdtest.New(t, nil)
|
||||
_ = coderdtest.CreateInitialUser(t, client)
|
||||
data := make([]byte, 1024)
|
||||
_, err := client.UploadFile(context.Background(), codersdk.ContentTypeTar, data)
|
||||
|
Reference in New Issue
Block a user