Etherpad Ui authentication - etherpad

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
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.

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.
Checkout the etherpad-lite Git project
git clone https://github.com/ether/etherpad-lite.git
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
Create a custom image of the etherpad-lite image
docker build --tag myetherpad .
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

Related

Chrome extension Oauth2 authentication and verification issue

I am developing chrome extension that uses several google API services. I've set up Oauth2 working code and authentication process works fine. However, I am getting "unverified app" screen and would like to get rid of that.
So, I went through google's verification process several times and I keep getting declined with explanation that I need to verify domain ownership of chromiumapp.org - which is I don't understand. Here's why:
By reading google's documentation about that topic I learned that I need to use https://.chromiumapp.org endpoint for webAuthFlow redirect url, which I did and everything worked fine. But now google wants me to prove my ownership of chromiumapp.org, which is unclear to me...
Here's the process of setting chromiumapp domain url as redirect url:
First I added https://my-extension-id.chromiumapp.org to Authorised redirect URIs section in google developers console.
Then, google notified me that chromiumapp.org domain needs to be added to Authorised domains section first (under consent screen tab) in order to be able to add it toAuthorised redirect URIs section. So, I added chromiumapp.org to Authorised domains
And now, when I apply for verification process, google wants me to verify my ownership of chromiumapp.org
Although I don't think that webAuthFlow code is relevant here, but here it is, just in case:
chrome.identity.launchWebAuthFlow(
{
"url": "https://accounts.google.com/o/oauth2/auth?" +
$.param({
"client_id": settings.CLIENT_ID,
"scope": settings.SCOPE,
"redirect_uri": getRedirectUri(),
"response_type": "code",
"access_type": "offline",
"login_hint": "",
"prompt": "consent select_account"
}),
"interactive": true
},
callback
);
My question is:
What am I doing wrong here?
Thanks!

How to use Firebase Auth's Google Sign-In option with Cypress.io

I need help using Google Sign-In when testing my Angular 6 app with Cypress. It can't use the sign-in popup, and so I'm trying to follow Cypress' advice to "always use cy.request() to talk to 3rd party servers via their APIs." That's from https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites which then points us to this example: https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/logging-in__single-sign-on/cypress/integration/logging-in-single-sign-on-spec.js - more info on how to do this is seen at minute 23 in a presentation by the Cypress author: https://www.youtube.com/watch?v=5XQOK0v_YRE
I'm taking the video solution and trying to modify it for Firebase Auth according to https://firebase.google.com/docs/auth/web/google-signin#advanced-authenticate-with-firebase-in-nodejs but I'm getting stuck on how to obtain the proper id_token and so far I have this code in my commands.js file:
Cypress.Commands.add('login', () => {
var id_token = ___?____;
cy.request({
method: 'POST',
url: 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyAssertion?key=[API_KEY]',
body: {
"requestUri": "http://localhost:3500",
"postBody": `id_token=${id_token}&providerId=google.com`,
"returnSecureToken": true,
"returnIdpCredential": true
}
})
})
I believe I need to use a different API to initiate the login and request user credentials, which will include the id_token, and so I tried https://firebase.google.com/docs/auth/web/google-signin#advanced-authenticate-with-firebase-in-nodejs but am not yet skilled enough to pull in external js files (https://apis.google.com/js/platform.js) into Node (This is probably not possible in js files the way it is in html). Using this package: https://github.com/google/google-auth-library-nodejs may be my next attempt. Is there anyone who can pick it up from here?
Similar question at Is it possible to use Cypress e2e testing with a firebase auth project? - but they are signing in with user and pass.

AWS LEX web UI sample

I am trying to run the sample AWS-Lex-Web-UI from the https://github.com/awslabs/aws-lex-web-ui#sample-site
As per the directions i am able to create the cognito pool id and also saved in the chatbot-ui-loader-config.json and tried with npm start. Server started at localhost:8000 but i am not able to run any one of the bot command.
Does anybody already implemented in the WEB-UI part using the sample example. I want to export my bot from AWS-LEX to any one of the local server.
chatbot-ui-loader-config.json:
{
"cognito": {
"poolId": "us-east-1:b3bxxxx-xxxx-45c7-xxxx-9xxxxxxxx"
},
"lex": {
"botName": "DataBot",
"initialText": "You can ask me for help rendering a file. Just type \"Render File\" or click on the mic and say it.",
"initialSpeechInstruction": "Say 'Render a file' to get started."
},
"polly": {
"voiceId": "Salli"
},
"ui": {
"parentOrigin": "",
"toolbarTitle": "File Processor"
},
"recorder": {
"preset": "speech_recognition"
}
}
Checkout the browser console for any errors. It helped me while I was trying this one out.
Here are some of the things that I experienced before I was able to try this out locally:
IAM permissions should be properly set such as cognito pools should have access to the Lex or that Polly should be able to access Lex.
Federated identities versus User Pools - I had to use Federated Identity pool.
I had the same issue. I followed this guide to solve my problem.
This issue is more related to setting proper permission for Amazon Cognito Pools. It can be checked from browser console as pointed out in the above answer.
The above link provide step by step guide.

How to find an alchemy API key?

I was wondering where can I find my alchemy API key on Bluemix? I looked at the following question on SO (Where to get the Alchemyapi API key?) however, my bluemix looks nothing like that.
I do not have an apikey field, only username and password along with a url. IBM's documentations are approaching the usefulness of Java Docs (I.E, loads of info very little as far as demos go)
Below is how my creds look like:
{
"url": "so_url",
"username": "3e49e046-....",
"password": "XXXX"
}
I downloaded the npm module using the following instructions (https://www.npmjs.com/package/watson-developer-cloud#alchemylanguage) it mentions that username and password are the api key, so do they just get concatenated together? Is there anything that I missing from my Bluemix by chance?
The way i have my api key now, i.e where it is just username and password merged together returns an invalid api key error.

Customize Openam Login page

I want to customize OpenAm login page, for client perspective,
I had check OpenaAm Chapter for latest XUI changes, ie by default it takes XUI
I tried to configure current default theme,
present in
XUI/themeConfig.json under the directory where we unpack OpenAM,
For example.
I had modify footer element : by default footer mailto element: info#forgerock.com
"footer": {
"mailto": "info#xyz.com",
"phone": ""
}
}
after pack and deploy war file,
But still it showing old one ie info#forgerock.com on startup
My question is what is the proper steps of customizing OpenAm login page , from OpenAm guide, it was bit confusing.
Please suggest
Thanks
a)Modify XUI\config\themeConfig.json, delete cache from your web browser...Then reload page and see what you had entered.
b)You can also set org.forgerock.openam.core.resource.lookup.cache.enabled, to false in Configuration > Servers and Sites > Server Name > Advanced to see in real time your modify, but in a Production Environment remember to change again to true for better performance.
Best regards,
Alex

Resources