mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-08-08 23:37:11 +00:00
package bootstrap matches dir
Change-Id: I56104a0a16e6bd1d7b12097f5eda417dd8ad6247
This commit is contained in:
@@ -32,7 +32,7 @@ import (
|
||||
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
|
||||
certutil "k8s.io/client-go/util/cert"
|
||||
bootstrapapi "k8s.io/cluster-bootstrap/token/api"
|
||||
bootstrap "k8s.io/cluster-bootstrap/token/jws"
|
||||
tokenjws "k8s.io/cluster-bootstrap/token/jws"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
bootstraptokenv1 "k8s.io/kubernetes/cmd/kubeadm/app/apis/bootstraptoken/v1"
|
||||
@@ -181,7 +181,7 @@ func validateClusterInfoToken(insecureClusterInfo *v1.ConfigMap, token *bootstra
|
||||
return nil, errors.Errorf("token id %q is invalid for this cluster or it has expired. Use \"kubeadm token create\" on the control-plane node to create a new valid token", token.ID)
|
||||
}
|
||||
|
||||
if !bootstrap.DetachedTokenIsValid(detachedJWSToken, insecureKubeconfigString, token.ID, token.Secret) {
|
||||
if !tokenjws.DetachedTokenIsValid(detachedJWSToken, insecureKubeconfigString, token.ID, token.Secret) {
|
||||
return nil, errors.New("failed to verify JWS signature of received cluster info object, can't trust this API Server")
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package bootstrap
|
||||
package jws
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package bootstrap
|
||||
package jws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
Reference in New Issue
Block a user