0

I have to implement authorization to access the etherpad UI so that it could not be public url.

For this, when i set the setting "requireAuthentication": true, then it throws web authentication throw browser as below

enter image description here

But In the application, when i access etherpad UI through iframe then it also shows authentication pop-up as above. Please suggest how i can make break through to access etherpad UI without auth pop-up in the application, But allow auth popup when it access from web browser instead of application ? OR any other way also appreciated.

Subhash Chandra
  • 123
  • 1
  • 1
  • 8

1 Answers1

0

Just posting here because google searches for "etherpad basic authentication" led me here.

This solution only applies to etherpad-lite via Docker

I had been wanting to enable some basic authentication as well without using LDAP or some plugin.

  1. Checkout the etherpad-lite Git project

git clone https://github.com/ether/etherpad-lite.git

  1. Edit the settings.json.docker

-Made 1 change to the file by setting requireAuthentication to true

-Took note of those 2 variable names (ADMIN_PASSWORD,USER_PASSWORD)

.
.
 "requireAuthentication": true
.
.

"users": {
    "admin": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth
      // 2) please note that if password is null, the user will not be created
      "password": "${ADMIN_PASSWORD:null}",
      "is_admin": true
    },
    "user": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth
      // 2) please note that if password is null, the user will not be created
      "password": "${USER_PASSWORD:null}",
      "is_admin": false
    }
  },

*all the other stuff can be left alone so I left out of this snippet

  1. Create a custom image of the etherpad-lite image docker build --tag myetherpad .

  2. Spin up your new etherpad instance and pass in those 2 variables

    ADMIN_PASSWORD: "someAdminPassword"

    USER_PASSWORD: "someUserPassword"

*I am using docker-compose so setting those variables will look a little different in vanilla Docker or K8

**There are definitely better ways to deliver authentication in etherpad-lite but I just needed a quick instance. This process would be very tedious if you were going to have more than a few users

JuanD
  • 391
  • 1
  • 6
  • 13