Bug 1531626
Summary: | Auth MIQLDAP AD - SSUI - Trouble logging into SSUI with group that has Accent Marks in group name. | |||
---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Matt Pusateri <mpusater> | |
Component: | UI - Service | Assignee: | Ohad Levy <ohadlevy> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Matt Pusateri <mpusater> | |
Severity: | medium | Docs Contact: | ||
Priority: | high | |||
Version: | 5.9.0 | CC: | awight, bascar, cpelland, dclarizi, gtanzill, lavenel, mpusater, obarenbo, yrudman | |
Target Milestone: | GA | Keywords: | Regression, TestOnly | |
Target Release: | 5.10.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | auth:miqldap:ad:openldap | |||
Fixed In Version: | 5.10.0.0 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1536047 (view as bug list) | Environment: | ||
Last Closed: | 2018-06-21 20:45:40 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1536047 |
Description
Matt Pusateri
2018-01-05 16:49:32 UTC
I did reproduce the issue without MiqLdap by creating groups with accent in CF and assigning a user to these groups. OPS UI works, SUI fails Matt Loic, anyone have a machine ip? Would help get this one going faster :-) Matt Loic, anyone have a machine ip? Would help get this one going faster :-) Woops looks like I can't quite bugzilla today Never mind, easy enough for me to recreate... our error is the following: GET http://localhost:3001/api/auth?requester_type=ws `{"error":{"kind":"bad_request","message":"PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding \"UTF8\": 0xe9 0x65 0x65\n: SELECT \"miq_groups\".* FROM \"miq_groups\" INNER JOIN \"miq_groups_users\" ON \"miq_groups\".\"id\" = \"miq_groups_users\".\"miq_group_id\" WHERE \"miq_groups_users\".\"user_id\" = $1 AND \"miq_groups\".\"description\" = $2 LIMIT $3","klass":"ActiveRecord::StatementInvalid"}}` and here's what our server is seeing: `[2018-01-09T08:49:48.073202 #8169] DEBUG -- : MiqGroup Load (1.4ms) SELECT "miq_groups".* FROM "miq_groups" INNER JOIN "miq_groups_users" ON "miq_groups"."id" = "miq_groups_users"."miq_group_id" WHERE "miq_groups_users"."user_id" = $1 AND "miq_groups"."description" = $2 LIMIT $3 [["user_id", 10000000000015], ["description", "\xE9eeeeeeee\xEA"], ["LIMIT", 1]] I, [2018-01-09T08:49:48.073989 #8169] INFO -- : Completed 400 Bad Request in 7ms (Views: 0.2ms | ActiveRecord: 1.6ms)` The rub is for the other call we do durning login, `api?attributes=authorization` we get 200, and it contains the correct group info `group:"éeeeeeeeeê"` Please forgive me Greg 😭 😏. Looks like the websockets auth request is mildly blowing up, this 400 halts SUI login, which otherwise has no problems completing (commented out the code that makes the call, login happens just fine). Found the root cause of the issue - the MIQ_GROUP header is being translated to "SR-APP-EPM-Membre-\xE9quipe" from "SR-APP-EPM-Membre-équipe". Have verified (with the help of Allen) that the SUI is sending the correct value. Working on a fix! https://github.com/ManageIQ/manageiq-api/pull/287 is one darn good looking pr to fix this pickle !! Ok but Jillian and I had another thought... what if we removed the offending header all together? It's no longer used, group switching happens through the api... do we even need it? https://github.com/ManageIQ/manageiq-ui-service/pull/1360 |