commits
This matches at least the Firefox extension when creating a new
account.
The upstream clients may crash if this value is returned as null
Issue #100
This is just a simple array that the Bitwarden clients manage for
us, so just pass it through to the db.
Closes #89
Also stop storing the attachment URL in the database, it's not used
by anything and may change later depending on this variable
Prefix all of these with RUBYWARDEN_, but still honor ALLOW_SIGNUPS
Pass the full key to encrypt and decrypt, along with the algorithm
(now defaulting to TYPE_AESCBC256_HMACSHA256_B64). If the algorithm
is TYPE_AESCBC256_HMACSHA256_B64 but the key is only 32 bytes, use
HKDF to stretch it and separate it into encryption and MAC keys.
Ref: https://github.com/bitwarden/jslib/commit/0429c0557b293ca97ea684ad8bb500c036d88ae3
Ref #79
Explicitly load it by its UUID
Fixes occasional MAC failures in this test
We'll need multiple process access to it in the future.
Also disable ActiveRecord migration verbosity since it will run
every time.
Bitwarden::CipherString.parse will catch invalid keys
Closes #78
The constant `User::DEFAULT_KDF_ITERATIONS` is not defined in the master and therefore the migrations will fail.
Setting this causes sinatra-activerecord to do some configuration of
its own which ends up trying to look at RACK_ENV which we aren't
using anymore.
If RACK_ENV is not set, which it may not be since RUBYWARDEN_ENV now
has to be used, it will default to development, which will cause
Sinatra to print stack traces and things to the public.
Protect users by setting RACK_ENV to "deployment" when
RUBYWARDEN_ENV is set to "production".
Continue to honor RACK_ENV if RUBYWARDEN_ENV is not defined
Fixes #73
Without this our data ends up as a raw object in the db.
Only tested on my end with keepass
Should fix #64 and #59
0 is PBKDF2, others are coming later
Closes #66
Before logging in, Bitwarden clients now POST to
$baseURL/accounts/prelogin asking for the KdfIterations of the
account given.
I'm not sure what the 'Kdf:0' parameter is though, so ignore it for
now.
Issue #66
Assume we just have a database at the old path
db/production.sqlite3, then dump that to the YAML file.
Then run the migration which will create the new, blank database at
db/production/production.sqlite3, which we will then import the YAML
file to.
Fixes #63
"bitwarden-ruby" made it seem like a library and possibly associated
with the upstream Bitwarden projects.
Also move AR migration docs to separate file since they won't be
needed for long.
The Sinatra update brought in ActiveSupport which for some reason
breaks nil.try(), so fix it again.
Pass the full key to encrypt and decrypt, along with the algorithm
(now defaulting to TYPE_AESCBC256_HMACSHA256_B64). If the algorithm
is TYPE_AESCBC256_HMACSHA256_B64 but the key is only 32 bytes, use
HKDF to stretch it and separate it into encryption and MAC keys.
Ref: https://github.com/bitwarden/jslib/commit/0429c0557b293ca97ea684ad8bb500c036d88ae3
Ref #79