Skip to content

Commit

Permalink
add deprecation notices to ProcessKubeCSR
Browse files Browse the repository at this point in the history
  • Loading branch information
tigrato committed Sep 20, 2024
1 parent 83c7007 commit b03e463
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/auth/auth_with_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -5203,6 +5203,8 @@ func (a *ServerWithRoles) DeleteSemaphore(ctx context.Context, filter types.Sema

// ProcessKubeCSR processes CSR request against Kubernetes CA, returns
// signed certificate if successful.
// DEPRECATED
// TODO(tigrato): DELETE IN 18.0
func (a *ServerWithRoles) ProcessKubeCSR(req authclient.KubeCSR) (*authclient.KubeCSRResponse, error) {
// limits the requests types to proxies to make it harder to break
if !a.hasBuiltinRole(types.RoleProxy) {
Expand Down
2 changes: 2 additions & 0 deletions lib/auth/authclient/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ func (c *HTTPClient) Delete(ctx context.Context, u string) (*roundtrip.Response,

// ProcessKubeCSR processes CSR request against Kubernetes CA, returns
// signed certificate if successful.
// DEPRECATED
// TODO(tigrato): DELETE IN 18.0
func (c *HTTPClient) ProcessKubeCSR(req KubeCSR) (*KubeCSRResponse, error) {
if err := req.CheckAndSetDefaults(); err != nil {
return nil, trace.Wrap(err)
Expand Down
2 changes: 2 additions & 0 deletions lib/auth/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import (

// ProcessKubeCSR processes CSR request against Kubernetes CA, returns
// signed certificate if successful.
// DEPRECATED
// TODO(tigrato): DELETE IN 18.0
func (a *Server) ProcessKubeCSR(req authclient.KubeCSR) (*authclient.KubeCSRResponse, error) {
ctx := context.TODO()
if err := enforceLicense(types.KindKubernetesCluster); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion lib/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ func TestProxyGRPCServers(t *testing.T) {
limiter: limiter,
conn: testConnector,
listener: secureListener,
kubeProxyAddr: *utils.MustParseAddr(secureListener.Addr().String()),
kubeProxyAddr: utils.FromAddr(secureListener.Addr()),
accessPoint: testConnector.Client,
lockWatcher: proxyLockWatcher,
emitter: testConnector.Client,
Expand Down

0 comments on commit b03e463

Please sign in to comment.