Skip to content

Commit 22cd8ce

Browse files
committed
TUN-5682: Remove name field from credentials
1 parent 9cd2780 commit 22cd8ce

File tree

4 files changed

+1
-6
lines changed

4 files changed

+1
-6
lines changed

cmd/cloudflared/tunnel/quick_tunnel.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ func RunQuickTunnel(sc *subcommandContext) error {
5555
AccountTag: data.Result.AccountTag,
5656
TunnelSecret: data.Result.Secret,
5757
TunnelID: tunnelID,
58-
TunnelName: data.Result.Name,
5958
}
6059

6160
url := data.Result.Hostname

cmd/cloudflared/tunnel/subcommand_context.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ func (sc *subcommandContext) create(name string, credentialsFilePath string, sec
185185
AccountTag: credential.cert.AccountID,
186186
TunnelSecret: tunnelSecret,
187187
TunnelID: tunnel.ID,
188-
TunnelName: name,
189188
}
190189
usedCertPath := false
191190
if credentialsFilePath == "" {
@@ -370,7 +369,7 @@ func (sc *subcommandContext) findID(input string) (uuid.UUID, error) {
370369
// Look up name in the credentials file.
371370
credFinder := newStaticPath(sc.c.String(CredFileFlag), sc.fs)
372371
if credentials, err := sc.readTunnelCredentials(credFinder); err == nil {
373-
if credentials.TunnelID != uuid.Nil && input == credentials.TunnelName {
372+
if credentials.TunnelID != uuid.Nil {
374373
return credentials.TunnelID, nil
375374
}
376375
}

cmd/cloudflared/tunnel/subcommand_context_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ func Test_subcommandContext_findCredentials(t *testing.T) {
116116
AccountTag: accountTag,
117117
TunnelID: tunnelID,
118118
TunnelSecret: secret,
119-
TunnelName: name,
120119
},
121120
},
122121
{
@@ -161,7 +160,6 @@ func Test_subcommandContext_findCredentials(t *testing.T) {
161160
AccountTag: accountTag,
162161
TunnelID: tunnelID,
163162
TunnelSecret: secret,
164-
TunnelName: name,
165163
},
166164
},
167165
}

connection/connection.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ type Credentials struct {
4141
AccountTag string
4242
TunnelSecret []byte
4343
TunnelID uuid.UUID
44-
TunnelName string
4544
}
4645

4746
func (c *Credentials) Auth() pogs.TunnelAuth {

0 commit comments

Comments
 (0)