Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for claims0 (0.24 sec)

  1. internal/config/identity/openid/jwt.go

    	// and overwrite them with the claims from JWT.
    	if ok && pCfg.ClaimUserinfo {
    		if accessToken == "" {
    			return errors.New("access_token is mandatory if user_info claim is enabled")
    		}
    		uclaims, err := pCfg.UserInfo(ctx, accessToken, r.transport)
    		if err != nil {
    			return err
    		}
    		for k, v := range uclaims {
    			if _, ok := claims[k]; !ok { // only add to claims not update it.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 30 18:10:41 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. cmd/jwt.go

    func authenticateNode(accessKey, secretKey, audience string) (string, error) {
    	claims := xjwt.NewStandardClaims()
    	claims.SetExpiry(UTCNow().Add(defaultInterNodeJWTExpiry))
    	claims.SetAccessKey(accessKey)
    	claims.SetAudience(audience)
    
    	jwt := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims)
    	return jwt.SignedString([]byte(secretKey))
    }
    
    // Check if the request is authenticated.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. security/pkg/util/jwtutil.go

    	if err != nil {
    		return nil, err
    	}
    	dec := json.NewDecoder(bytes.NewBuffer(claimBytes))
    
    	claims := make(map[string]any)
    	if err := dec.Decode(&claims); err != nil {
    		return nil, fmt.Errorf("failed to decode the JWT claims")
    	}
    	return claims, nil
    }
    
    func DecodeJwtPart(seg string) ([]byte, error) {
    	if l := len(seg) % 4; l > 0 {
    		seg += strings.Repeat("=", 4-l)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 16:07:11 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. cmd/bucket-policy.go

    	// JWT specific values
    	//
    	// Add all string claims
    	for k, v := range claims {
    		vStr, ok := v.(string)
    		if ok {
    			// Trim any LDAP specific prefix
    			args[strings.ToLower(strings.TrimPrefix(k, "ldap"))] = []string{vStr}
    		}
    	}
    
    	// Add groups claim which could be a list. This will ensure that the claim
    	// `jwt:groups` works.
    	if grpsVal, ok := claims["groups"]; ok {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/telemetry/PATENTS

    transfer and otherwise run, modify and propagate the contents of this
    implementation of Go, where such license applies only to those patent
    claims, both currently owned or controlled by Google and acquired in
    the future, licensable by Google that are necessarily infringed by this
    implementation of Go.  This grant does not include claims that would be
    infringed only as a consequence of further modification of this
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 21:40:49 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  6. internal/config/identity/openid/jwt_test.go

    		{time.Duration(3) * time.Minute, "900", false},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			claims := map[string]interface{}{}
    			claims["exp"] = testCase.exp
    			err := updateClaimsExpiry(testCase.dsecs, claims)
    			if err != nil && !testCase.expectedFailure {
    				t.Errorf("Expected success, got failure %s", err)
    			}
    			if err == nil && testCase.expectedFailure {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  7. security/pkg/util/jwtutil_test.go

    		"65xiNg"
    
    	// oneAudString includes one `aud` claim "abc" of type string.
    	oneAudString = "header.eyJhdWQiOiJhYmMiLCJleHAiOjQ3MzI5OTQ4MDEsImlhdCI6MTU3OTM5NDgwMSwiaXNzIjoidGVzdC1pc3N1ZXItMUBpc3Rpby5pbyIsInN1YiI6InN1Yi0xIn0.signature" // nolint: lll
    
    	// twoAudList includes two `aud` claims ["abc", "xyz"] of type []string.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 16:07:11 UTC 2024
    - 6K bytes
    - Viewed (0)
  8. pkg/kubelet/cm/dra/plugin/client_test.go

    			if err != nil {
    				t.Error(err)
    				return
    			}
    
    			req := &drapbv1alpha3.NodePrepareResourcesRequest{
    				Claims: []*drapbv1alpha3.Claim{
    					{
    						Namespace:      "dummy-namespace",
    						Uid:            "dummy-uid",
    						Name:           "dummy-claim",
    						ResourceHandle: "dummy-resource",
    					},
    				},
    			}
    			client.NodePrepareResources(context.TODO(), req)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 19 16:27:05 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  9. pilot/pkg/security/authz/model/util.go

    			if err != nil {
    				return nil, err
    			}
    			return []string{ret}, nil
    		}
    		claims = append(claims, s[begin+1:end])
    		begin = end + 1
    	}
    	return claims, nil
    }
    
    func MetadataStringMatcherForJWTClaim(claim string, m *matcherpb.StringMatcher) *matcherpb.MetadataMatcher {
    	return MetadataValueMatcherForJWTClaim(claim, &matcherpb.ValueMatcher{
    		MatchPattern: &matcherpb.ValueMatcher_StringMatch{
    			StringMatch: m,
    		},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 25 10:39:25 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/authentication/cel/compile_test.go

    				&ClaimMappingExpression{
    					Expression: "claims.foo",
    				},
    			},
    			wantErr: `compilation failed: ERROR: <input>:1:1: undeclared reference to 'claims' (in container '')`,
    		},
    		{
    			name: "ExtraMappingCondition with wrong env",
    			expressionAccessors: []ExpressionAccessor{
    				&ExtraMappingExpression{
    					Expression: "claims.foo",
    				},
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 7.3K bytes
    - Viewed (0)
Back to top