sc4224

sc4224

Hi, asking for the opinion of elixir devs with experience in HIPAA compliancy.

As far as authentication goes. Is there a preference of token-based vs session-based authentication to ensure HIPAA compliancy? Would devs implementing authentication be predisposed to use one method over the other? Does HIPAA compliancy even prioritize one method over the other?

Showing Posts 1 to 7

tangui

tangui

Hi,

No HIPAA experience but as stated here you have to support logout.

To manage logout with JWTs, you’ll need… to manage states! Also some links on JWTs for authentication sessions that have already been posted here:

sc4224

sc4224 OP

@tangui so does that it is HIGHLY recommended and BEST practice to use session-based authentication? Even though HIPAA does not specifically state anything about using session-based over token-based authentication, it is better to use session-based authentication anyway correct?

tangui

tangui

I have no idea about HIPAA but if it is required to manage logout (and you should read their specs / recommendations / etc.) then you better use stateful (= session-based) sessions because if you use stateless sessions (JWTs…), you’ll end up reimplementing stateful sessions to support logout.

My opinion is that JWTs became popular for this because it’s hard to manage state in a cluster behind load-balancing with most languages and platforms, but that’s not (or less) the case with Erlang / Elixir.

sc4224

sc4224 OP

@tangui ok i understand. As far as implementation of session-based authentication is concerned. I’m trying to use ueberauth/guardian to do the implementation. It seems like it is JWT (token-based) rather than session-based. Are there any alternative libraries or tutorials on how to implement session-based authentication for elixir? Does guardian provide an option for session-based authentication?

danschultzer

danschultzer

Pow Core Team
tangui

tangui

You don’t necessarily need a library for that: just set an authentication cookie after authentication. Depending on the session lifetime and deployment scenario (cluster? single server? sticky sessions on your lb or not?) you have plenty of choices for a backend where to store sessions:

  • ETS
  • Mnesia
  • Ecto
  • Redis
  • Etc.

Also you have to secure your cookie by:

  • setting the correct cookie flags (secure, HTTPonly)
  • protecting against CSRF

I saw that Dan posted an answer, so yes you might be interested too in lib that does that already :slight_smile:

OvermindDL1

OvermindDL1

I deal with HIPAA at work, and I use session based to our SSO and it is time based logout, and if an early logout is performed it logs out of everything else that uses the SSO as well (and vice-versa). I just verify with the SSO on-access if the account is still logged in or not.

So… I put the onus on the people that manage the SSO (other contractors). ^.^

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
aseigo
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews