You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "jensg-st (via GitHub)" <gi...@apache.org> on 2023/02/07 07:59:11 UTC

[GitHub] [apisix-ingress-controller] jensg-st opened a new issue, #1656: bug: hyphen in basicAuth names is not working

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: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] jensg-st commented on issue #1656: bug: hyphen in basicAuth names is not working

Posted by "jensg-st (via GitHub)" <gi...@apache.org>.
jensg-st commented on issue #1656:
URL: https://github.com/apache/apisix-ingress-controller/issues/1656#issuecomment-1420590863

   Cool, thanks. We can work around that.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] AlinsRan commented on issue #1656: bug: hyphen in basicAuth names is not working

Posted by "AlinsRan (via GitHub)" <gi...@apache.org>.
AlinsRan commented on issue #1656:
URL: https://github.com/apache/apisix-ingress-controller/issues/1656#issuecomment-1420349415

   apisix does not support hyphens `-`.
   https://github.com/apache/apisix/issues/7825


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] jensg-st closed issue #1656: bug: hyphen in basicAuth names is not working

Posted by "jensg-st (via GitHub)" <gi...@apache.org>.
jensg-st closed issue #1656: bug: hyphen in basicAuth names is not working
URL: https://github.com/apache/apisix-ingress-controller/issues/1656


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org