enchant97 / note-mark

Note Mark is a lighting fast and minimal; web-based Markdown notes app.
https://notemark.docs.enchantedcode.co.uk/
GNU Affero General Public License v3.0
297 stars 6 forks source link

Disable security or control the cookie expiration #177

Open ctrlbrk42 opened 8 months ago

ctrlbrk42 commented 8 months ago

Does it fit the projects scope?

Why?

I am using a reverse proxy for auth, so I prefer not having to re-login to the KB every day.

Solution?

Can you provide a docker env var to disable authentication and just set a default username? Or can you provide a mechanism to set the cookie expiration to a far away date.

Alternatives?

No response

Extra Context

No response

ctrlbrk42 commented 8 months ago

I found TOKEN_EXPIRY and am trying that, I didn't see initially (I keep having trouble not finding the docs to your project).

docker env: TOKEN_EXPIRY: 5184000 # 60-days

enchant97 commented 8 months ago

There is currently no way to integrate with other auth mechanisms. TOKEN_EXPIRY is a suitable way of increasing the limit.

I keep having trouble not finding the docs to your project

Not sure how, it's linked in the project README and added as the project website in the about section. Here's a link as well: https://notemark.docs.enchantedcode.co.uk/docs/

ctrlbrk42 commented 8 months ago

Will it accept 0 or -1 value to effectively disable?

enchant97 commented 8 months ago

It only accepts the number of seconds until expiry and cannot currently be disabled.

How do you currently provide authentication through your reverse proxy?

In the future I plan to add external authentication via OAuth2, since this is what the app uses internally already.

ctrlbrk42 commented 8 months ago

For something like this, I'm just using basic auth in caddy since it doesn't have anything super sensitive.

Thanks for responding.