Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Fredrik Burmester
@fredrikburmester
Screenshot 2021-09-29 at 10.01.02.png
Matt Gibson
@MGibson1
so you're running npm run build:watch and want the server to direct all non-web calls to either your local vaultwarden or bitwarden cloud?
Fredrik Burmester
@fredrikburmester
If i go to /src/app/services/services.module.ts line 152, I can change the baseURL manually to my vaultwarden domain, but then I get a CORS error.
Yes. I've tried ENV=production npm run build:oss:watch as per the docs as well.
Matt Gibson
@MGibson1

This is fairly untested, but I developed a config loading mechanism called config.js in the base directory

That loads proxy and other settings from ./config/XXXXX.js files. If you define a ./config/local.js which overwrites the relevant service urls, you should be g2g

Fredrik Burmester
@fredrikburmester
Yes I did that, and it did not change any outgoing request URLs sadly. I created a local.js file and entered my vaultwarden domain, but I still get the same error as in the image I sent.
Matt Gibson
@MGibson1
image.png
when you first run the npm script, you should see a printout of the loaded config, can you confirm it's loading your proxy settings correctly?
Fredrik Burmester
@fredrikburmester
Yes
But if we ignore my vaultwarden setup (since that might come with other issues), just connecting to bitwarden cloud is not working.
Matt Gibson
@MGibson1
what command are you running?
Fredrik Burmester
@fredrikburmester
ENV=production npm run build:oss:watch
As per the Github README
Matt Gibson
@MGibson1
oof, need to update that :( try ENV=cloud npm run build:oss:watch
our devops team didn't like production since that's ambiguous between cloud and self-hosted users
Fredrik Burmester
@fredrikburmester
Yeah I though that might have been the issue, so I've already tried EVN=cloud but it still doesn't change the errors i sent in the image above.
The baseURL for all requests are still localhost:8080
Matt Gibson
@MGibson1
ah, I bet it's because cloud doesn't set any proxies for api/identity/etc. let me test out locally quickly, but that feels right to me
Fredrik Burmester
@fredrikburmester
Okay!
Oscar Hinton
@Hinton
@MGibson1 I think we forgot to setup the proper proxies in production after https://github.com/bitwarden/web/pull/1151/files
@fredrikburmester I think if you add the following to .config/local.json thing should start working
{
    "proxyApi": "https://api.bitwarden.com",
    "proxyIdentity": "https://identity.bitwarden.com",
    "proxyEvents": "https://events.bitwarden.com",
    "proxyNotifications": "https://notifications.bitwarden.com",
    "proxyPortal": "https://portal.bitwarden.com"
}
Matt Gibson
@MGibson1
that was my thought too
Fredrik Burmester
@fredrikburmester
This is now my envConfig that I get in the terminal:
envConfig
{
  "urls": {
    "icons": "https://icons.bitwarden.net",
    "notifications": "https://notifications.bitwarden.com",
    "enterprise": "https://portal.bitwarden.com"
  },
  "stripeKey": "pk_live_bpN0P37nMxrMQkcaHXtAybJk",
  "braintreeKey": "production_qfbsv8kc_njj2zjtyngtjmbjd",
  "paypal": {
    "businessId": "4ZDA7DLUUJGMN",
    "buttonAction": "https://www.paypal.com/cgi-bin/webscr"
  },
  "proxyApi": "https://api.bitwarden.com",
  "proxyIdentity": "https://identity.bitwarden.com",
  "proxyEvents": "https://events.bitwarden.com",
  "proxyNotifications": "https://notifications.bitwarden.com",
  "proxyPortal": "https://portal.bitwarden.com"
}
But I still get the same error in the browser console
Matt Gibson
@MGibson1
me too
ah, the proxies don't start unless ENV == development I think we've made a catch-22 here
try just copying that envConfig to local.js and running with ENV=development
that way we force all the config we want but still start up the devServer
that works for me :fingers crossed:, how about you?
Fredrik Burmester
@fredrikburmester
This worked
:D
Matt Gibson
@MGibson1

excellent. Now to figure out how to make this actually make sense...

I think ideally it would just work. we could create another config profile, but I'm not convinced that's the right call. Do you have a suggestion?

Fredrik Burmester
@fredrikburmester
I don't know much here so please correct me if i'm wrong... But the cloud config should include those proxyApi's right, or is it used for something else? And we should change to the correct ENV variable. If the config looked like that when i cloned the repo then it would have worked.
Oscar Hinton
@Hinton
@MGibson1 I think we can modify the webpack config to either always start the proxies or only start them when NODE_ENV=development. I don't want to touch the non proxy settings since they will end up in the output when building.
Matt Gibson
@MGibson1
@fredrikburmester The cloud config is actually there for our cloud deployment. In cloud production, it uses that config file to set appropriate URLs and keys we want specific to that environment
Fredrik Burmester
@fredrikburmester
I see.
Matt Gibson
@MGibson1
@Hinton yeah, NODE_ENV makes more sense than ENV as it is today.
Noah Wöhler
@NoahWoehler_twitter
Hi, can I post a call for participants in an interview study on open source projects here? If any mod wants more details via DM first, then I'm happy to oblige :)
digital mystik
@digital-mystik:matrix.org
[m]
hello.. has there been a change to accessing the API for the official instance? noticed that ofr the last few days I am unable to log into my account via a cli application that I use (rbw).. getting a request returned error 400. Is this related? [bitwarden/server#1626]
digital mystik
@digital-mystik:matrix.org
[m]
since it was recently merged, guessing it will take a little while for it to go live
Thomas Rittson
@eliykat
Yes, there have been some issues affecting the official CLI client since we turned on CAPTCHA protection, I assume rbw is probably hitting the same problems. That PR has been prioritised for the upcoming release, scheduled for 26 Oct.
Debabrata Roy
@DebR_gitlab
Hi team , I want to develop bitwarden into mobile app. I have not find any source code or documentation or SDK in java or kotlin. How to set up bitwarden in my own app?
Thomas Rittson
@eliykat
Hi there, our mobile app is written in C# using Xamarin Forms. The source code and documentation is available here: https://github.com/bitwarden/mobile.
Debabrata Roy
@DebR_gitlab
Hi , do you have provide facial recognition support in Bitwarden?
2 replies
Andy Hawkins
@adhawkins
Is there any way of searching my vault for a specific password?
1 reply
I want to search on the value of the password, rather than the site name or whatever.
Jarab Tech
@JamieTechTweets_twitter
Hi
Neko Boi Nick
@thakyZ
Should I be concerned that bitwarden keeps sending audit request in windows and filling the event logs?
Vinny P
@vinnyp:matrix.org
[m]
Anyone in here protect Bitwarden logins with fail2ban?
2 replies