imixs / imixs-cloud

A Lightweight Kubernetes Environment
https://imixs.github.io/imixs-cloud/
GNU General Public License v3.0
200 stars 82 forks source link

How to create basic auth secret? #43

Closed sonisaurabh19 closed 3 years ago

sonisaurabh19 commented 4 years ago

Hi, the middleware for basic-auth that uses the authsecret has user "admin" and password "adminadmin". Can you please share steps on how you generated the following data:

  #------------ Paste your own password file content here (default user/password=admin/adminadmin)--------------
  data:
    users: |2
      YWRtaW46JGFwcjEkWXdmLkF6Um0kc3owTkpQMi55cy56V2svek43aENtLwoKdXNl
      cjokYXByMSRaU2VKQW1pOSRVV1AvcDdsQy9KSzdrbXBIMXdGL28uCgo=
rsoika commented 4 years ago

You can use the commadline tool 'htpasswd' which is part of the apache2-utils. The content of that file can than be copy/paste into the middleware configuration. See here

Let me know if this answers your question.

sonisaurabh19 commented 4 years ago

thanks @rsoika that helps, although one followup - what does users: |2 mean? Like 2 users or does it have something to do with encoding? And if there are 2 users, why don't we specify both passwords like:

users: |2
   ABC......
   DEF.......
rsoika commented 4 years ago

I feared this question ;-) I don't really know what the |2 means and how exactly this kind of configuration should be structured in a Kubernetes object description....

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.