Basic Auth: Consumers with same username


I have a usecase where there are two consumers with same username but I cant configure it using basic auth plugin as username has to be unique
Is there any way to handle such scenario?

curl -d “username=user123&custom_id=SOME_CUSTOM_ID” http://localhost:8001/consumers/

curl -X POST http://localhost:8001/consumers/user123/basic-auth --data “username=Aladdin” --data “password=OpenSesame”

curl -d “username=user1234&custom_id=SOME_CUSTOM_ID1” http://localhost:8001/consumers/

curl -X POST http://localhost:8001/consumers/user1234/basic-auth --data “username=Aladdin” --data “password=OpenSesame”

{“message”:“UNIQUE violation detected on ‘{username=“Aladdin”}’”,“name”:“unique constraint violation”,“fields”:{“username”:“Aladdin”},“code”:5}

Why there is violation when I am creating same username in other different consumer?
Does Kong does not not support same username with different consumers ?


Please do not cross post between this forum and GitHub issues ( This is duplicating work for us and someone is already helping you on your other post.


Sorry for the trouble, I posted it out of confusion related to the category of the issue