-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
operator/agent: Refactor to remove mTLS references
Signed-off-by: Tam Mach <tam.mach@cilium.io>
- Loading branch information
Showing
11 changed files
with
74 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright Authors of Cilium | ||
|
||
// Package auth provides routines to manage mTLS identities in Cilium. | ||
// Package auth provides routines to manage mutual authentication identities in Cilium. | ||
// If enabled, the operator will watch for CiliumIdentity resources and provision | ||
// corresponding external identities such as SPIFFE identities. | ||
package auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright Authors of Cilium | ||
|
||
package auth | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/cilium/cilium/pkg/auth/certs" | ||
"github.com/cilium/cilium/pkg/policy" | ||
) | ||
|
||
// alwaysPassAuthHandler implements an authHandler by just authenticate every request | ||
// This is only for testing purpose. | ||
type alwaysPassAuthHandler struct { | ||
} | ||
|
||
func (r *alwaysPassAuthHandler) authenticate(authReq *authRequest) (*authResponse, error) { | ||
// Authentication trivially done | ||
log.Debugf("auth: Successfully authenticated request") | ||
|
||
return &authResponse{ | ||
expirationTime: time.Now().Add(1 * time.Minute), | ||
}, nil | ||
} | ||
|
||
func (r *alwaysPassAuthHandler) authType() policy.AuthType { | ||
// return a dummy auth type as this auth type is used only for testing | ||
return policy.AuthType(100) | ||
} | ||
|
||
func (r *alwaysPassAuthHandler) subscribeToRotatedIdentities() <-chan certs.CertificateRotationEvent { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters