Open jlmitch5 opened 6 years ago
Upon further investigation, the API does accept json where a dict/json is expected. The confusing part is the crappy error message. If the json is of the expected structure and contains the expected key/values then it is accepted. If not, the unicode error message is returned. Below is an example of an expected payload.
{
"SOCIAL_AUTH_AZUREAD_OAUTH2_ORGANIZATION_MAP":{"Default": {"admins": "true"}}
}
This is present in AWX 2.1.0 deployed on OpenShift, using SAML auth. If I use the "Example SAML Team Map" verbatim from https://docs.ansible.com/ansible-tower/latest/html/administration/ent_auth.html#saml-authentication-settings I get the same error, likewise with { "foo" : "bar" }
@stenwt Tower docs are for tower. docs/* are for awx. We've updated awx/docs/auth/saml.md with a more cohesive example. Can you tell us if the saml.md example works for you?
https://github.com/ansible/tower/blob/devel/awx/sso/conf.py#L1175-L1186
I think SocialTeamMapField
should be SAMLTeamAttrField
?
To reproduce, set this form value to valid json in the settings/auth form and save:
Expected
Actual
"Expected a dictionary of items but got type \"unicode\"."