@austingebauer Thank you very much for your quick response…
I am new to use Vault as OIDC identity provider. I am following below steps. Kindly refer and let me know if i am missing any steps.
Initialized and unsealed the Vault and i got Root-Token and master keys
Step 1: I am using Root-Token to perform following operations.
Step 2: Create a key
Request:
Data: map[string]interface{}{
“allowed_client_ids”: *,
“algorithm”: RS256,
}
Step 3: Create an entity
Request:
Data: map[string]interface{}{
“name”: “test-entity”,
“metadata”: map[string]string{
“email”: “test@hashicorp.com”,
“phone_number”: “123-456-7890”,
},
}
Step 4: Create a group
Request:
Data: map[string]interface{}{
“name”: name,
“member_entity_ids”: Step 3 entity id,
“member_group_ids”: null,
}
Step 5: Create an assignment
Data: map[string]interface{}{
“entity_ids”: string{Step 3 entity id},
“group_ids”: string{Step 4 groupID},
}
Step 6: Create a client
Data: map[string]interface{}{
“key”: “Step 2 key”,
“redirect_uris”: string{“https://localhost:8251/callback”},
“assignments”: string{“Step 5 assignment”},
“id_token_ttl”: “24h”,
“access_token_ttl”: “24h”,
}
Step 7: Create a custom scope
Data: map[string]interface{}{
“template”: “groups”: {{identity.entity.groups.names}},
}
Step 8: Create a provider
Data: map[string]interface{}{
“allowed_client_ids”: string{Step 6 clientID},
“scopes_supported”: string{" Step 7 scope"},
}
Step 9: Invoke Authorize endpoint.
Data: map[string]interface{}{
“client_id”: Step 6 clientID,
“scope”: “openid”,
“redirect_uri”: “https://localhost:8251/callback”,
“response_type”: “code”,
“state”: “abcdefg”,
“nonce”: “hijklmn”,
}
During this endpoint invocation i am getting Identity entity must be associated with the request validation message.
How do i associate entity with vault root token? Or do i need to generate any other vault token to perform these operations?
I am referring identity_store_oidc_provider_test.go source file from vault source code and TestOIDC_Path_OIDC_Authorize method.
Please provide some advice on this.
Note:
- I am using Postman to testing the flow.
- I am using vault 1.12.2 version.
Thanks & Regards
Samy