jensg-st opened a new issue, #1656:
URL: https://github.com/apache/apisix-ingress-controller/issues/1656

   ### Current Behavior
   
   I did create a service from the example like the following: 
   
   ```
   apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
    name: httpserver-route
   spec:
    http:
    - name: rule1
      priority: 200
      match:
        hosts:
        - myhost.demo
        paths:
          - /testme
      backends:
      - serviceName: httpbin
        servicePort: 80
      authentication:
        enable: true
        type: basicAuth
      plugins:
      - name: consumer-restriction
        enable: true
        config:
          whitelist:
          - "default_user"
          - "default_random-user
   ```
   
   To test this I did add two users: 
   
   ```
   apiVersion: apisix.apache.org/v2
   kind: ApisixConsumer
   metadata:
     name: user
   spec:
     authParameter:
       basicAuth:
         value:
           username: user1
           password: password
   ```
   
   ```
   apiVersion: apisix.apache.org/v2
   kind: ApisixConsumer
   metadata:
     name: random-user
   spec:
     authParameter:
       basicAuth:
         value:
           username: user2
           password: password
   ```
   
   I can login with the first user but not with the second. I have treid 
different combinations but it seems to be the hypen in the ApisixConsumer name 
which does not work. I don't know if that is ingress controller related or core 
apisix. 
   
   ### Expected Behavior
   
   Kubernetes consumers should be able to use hyphens in their name. 
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   see above
   
   ### Environment
   
   - APISIX Ingress controller version (run `apisix-ingress-controller version 
--long`)
   
   ```
   Version: 1.6.0
   Git SHA: no-git-module
   Go Version: go1.19.5
   Building OS/Arch: linux/amd64
   Running OS/Arch: linux/amd64
   ```
   
   - Kubernetes cluster version (run `kubectl version`)
   
   ```
   Client Version: version.Info{Major:"1", Minor:"24", 
GitVersion:"v1.24.7+k3s1", 
GitCommit:"7af5b16788afe9ce1718d7b75b35eafac7454705", GitTreeState:"clean", 
BuildDate:"2022-10-25T19:31:34Z", GoVersion:"go1.18.7", Compiler:"gc", 
Platform:"linux/amd64"}
   Kustomize Version: v4.5.4
   Server Version: version.Info{Major:"1", Minor:"24", 
GitVersion:"v1.24.7+k3s1", 
GitCommit:"7af5b16788afe9ce1718d7b75b35eafac7454705", GitTreeState:"clean", 
BuildDate:"2022-10-25T19:31:34Z", GoVersion:"go1.18.7", Compiler:"gc", 
Platform:"linux/amd64"}
   ```
   
   - OS version if running APISIX Ingress controller in a bare-metal 
environment (run `uname -a`)
   
   `Linux jensgwork.local 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 
UTC 2023 x86_64 x86_64 x86_64 GNU/Linux`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to