Giter Site home page Giter Site logo

Comments (8)

ruslandoga avatar ruslandoga commented on July 20, 2024 2

👋 @xiaohanyu

Your TOTP_VAULT_KEY (added in v2.1.0) seems to be invalid, more info on it is in the "Quick start" https://github.com/plausible/community-edition/tree/v2.1.0#quick-start section of the guide.

The error comes from https://github.com/plausible/analytics/blob/cc867396b237c10ea996783844dc19e3e110aa73/config/runtime.exs#L163

from community-edition.

zoldar avatar zoldar commented on July 20, 2024 2

May I know why it mandates 32 chars for TOTP_VAULT_KEY?

This requirement comes from the library we use for vaulting the TOTP secrets in the database (so that they remain encrypted "at rest") - Cloak. This in turn is caused by specific requirements for AES key used for encryption and decryption in the underlying core OTP :crypto API.

from community-edition.

ruslandoga avatar ruslandoga commented on July 20, 2024

👋 @thenitai

Could you explain a bit more please? The current docker-compose.yml uses plausible/analytics:v2.0

from community-edition.

thenitai avatar thenitai commented on July 20, 2024

Look at the v2.1 branch. The plausible link in the docker-compose file doesn't work

from community-edition.

ruslandoga avatar ruslandoga commented on July 20, 2024

Ah, thank you! I've updated it to a release candidate.

from community-edition.

xiaohanyu avatar xiaohanyu commented on July 20, 2024

Hello, I use v2.1.0 branch's docker-compose.yml and it reports with following error:

docker-compose -f compose.production.yml logs -f plausible
plausible-plausible-1  | ERROR! Config provider Config.Reader failed with:
plausible-plausible-1  | ** (ArgumentError) incorrect padding
plausible-plausible-1  |     (elixir 1.16.0) lib/base.ex:735: Base.decode64base!/2
plausible-plausible-1  |     /app/releases/0.0.1/runtime.exs:163: (file)
plausible-plausible-1  |     (elixir 1.16.0) src/elixir.erl:405: :elixir.eval_external_handler/3
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:750: :erl_eval.do_apply/7
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:1026: :erl_eval.expr_list/7
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:456: :erl_eval.expr/6
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:539: :erl_eval.expr/6
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:325: :erl_eval.expr/6
plausible-plausible-1  |
plausible-plausible-1  |
plausible-plausible-1  | Runtime terminating during boot ({#{message=><<"incorrect padding">>,'__struct__'=>'Elixir.ArgumentError','__exception__'=>true},[{'Elixir.Base','decode64base!',2,[{file,"lib/base.ex"},{l
ine,735}]},{elixir_eval,'__FILE__',1,[{file,"/app/releases/0.0.1/runtime.exs"},{line,163}]},{elixir,eval_external_handler,3,[{file,"src/elixir.erl"},{line,405}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,
750}]},{erl_eval,expr_list,7,[{file,"erl_eval.erl"},{line,1026}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,456}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,539}]},{erl_eval,expr,6,[{file,"erl_eval.erl"},
{line,325}]}]})
plausible-plausible-1  |
plausible-plausible-1  | Crash dump is being written to: erl_crash.dump...done
plausible-plausible-1  | ERROR! Config provider Config.Reader failed with:
plausible-plausible-1  | ** (ArgumentError) incorrect padding
plausible-plausible-1  |     (elixir 1.16.0) lib/base.ex:735: Base.decode64base!/2
plausible-plausible-1  |     /app/releases/0.0.1/runtime.exs:163: (file)
plausible-plausible-1  |     (elixir 1.16.0) src/elixir.erl:405: :elixir.eval_external_handler/3
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:750: :erl_eval.do_apply/7
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:1026: :erl_eval.expr_list/7
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:456: :erl_eval.expr/6
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:539: :erl_eval.expr/6
plausible-plausible-1  |     (stdlib 5.2) erl_eval.erl:325: :erl_eval.expr/6
plausible-plausible-1  |

v2.0 works well.

Just FYI.

@ruslandoga

from community-edition.

xiaohanyu avatar xiaohanyu commented on July 20, 2024

@ruslandoga works like a charm after change TOTP_VAULT_KEY to be 32 chars long.

May I know why it mandates 32 chars for TOTP_VAULT_KEY?

Meanwhile, I suggest to declare this requirements in the doc to avoid future confusions.

from community-edition.

ruslandoga avatar ruslandoga commented on July 20, 2024

Meanwhile, I suggest to declare this requirements in the doc to avoid future confusions.

Right, will do! Thank you for the suggestions.

May I know why it mandates 32 chars for TOTP_VAULT_KEY?

@zoldar could help with this one out please?

from community-edition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.