The Michael is correct, if your goal is to prevent leakage of those usernames even to Gluu Server itself, the only way is to customize some authentication script. I first thought you need only to prevent their leakage to some 3rd-party app accessing Gluu Server via OIDC.
Answering your previous question:
>In the 'Manage Authentication' page, it seems we can only specify one primary key. Or maybe it's in the cache refresh config? (it looks like we can add more than one key attribute).
You can only specify one primary key, this is correct. The only way to use several different attributes for authentication is a script like Michael referenced before. You also will need to make sure a corresponding user entry exists at Gluu, still, as it's requirement posed by its design. If it won't be able to find such entry, authentication will fail, even if credentials' check against backend will be successful. Thus you'll need to configure Cache Refresh in such way it will only pull attributes you are ready to reveal into Gluu Server. This most likely will mean you'll need to write a CR custom script, or add an enrolment/user attributes' update procedures to the script itself.
Just one thing you should be aware of, if you can't tolerate usernames of those users to even reach your Gluu instance. If it's some instance you've already used for some time, and even have CR running there, it's very likely those users are already made it to Gluu's inernal user cache, so you may need to do some clean up, and then review your CR configuration.
Btw, this ticket is of "Public" type and thus it's visible to everybody. I see 2 slightly different company names associated with Ville de Montreal's tickets, one related to "Community" (non-customer) tickets, the other one to private customer's ticket. You probably need to get in contact with a person on your team who will be able to enlist you as a member of the proper organisation here, on Support portal. This will allow you to create private tickets as well.