Commit graph

39 commits

Author SHA1 Message Date
José Valim
3cc66a6ab9 Always redirect / to /apps if using teams auth 2024-07-04 10:49:31 +02:00
Jonatan Kłosko
29c2877272
Group proxy endpoints under a shared prefix (#2666) 2024-06-21 14:06:18 +02:00
Jonatan Kłosko
8556a17a5d
Make auth-dependent tests async (#2654) 2024-06-14 19:16:48 +02:00
Jonatan Kłosko
81f6744a71
Refactor auth config (#2650) 2024-06-14 18:59:54 +02:00
Jonatan Kłosko
197f4868e1
Support proxy requests on generic app URL and await session execution (#2618) 2024-05-24 20:34:11 +02:00
Jonatan Kłosko
428d9ff591
Document request proxy and shift boundaries (#2617) 2024-05-24 19:37:41 +02:00
Alexandre de Souza
a0a3f548fe
Merge kino_proxy proof of concept into Livebook (#2615) 2024-05-24 14:27:38 +02:00
Alexandre de Souza
16bd46b54f
Allow Livebook to proxy requests to the runtime (#2608) 2024-05-20 17:04:04 -03:00
José Valim
29c5cb1904 ZTA revamp
* Rename SessionIdentity to PassThrough and make it part of ZTA

* Compute the ID at the Plug level, rather than ZTA level and
  avoid storing it twice

* Stop the user "avatar" from flashing on initial render

* Do not duplicate identity data inside user data, rather keep
  them distinct
2024-04-13 10:29:22 +02:00
Milad
fa4addcb50
Fix invalid cookie naming - cookie names can't contain : (#2539)
Closes #2537

RFCs:
* http://tools.ietf.org/html/rfc6265#section-4.1.1
* http://tools.ietf.org/html/rfc2616#section-2.2
2024-04-02 15:25:08 +02:00
José Valim
6027a0bd70 Surface ZTA payload
Closes #2320.
2024-03-28 09:03:34 +01:00
Jonatan Kłosko
07aaea11b4
Separate apps from auth and improve apps navigation (#2322) 2023-11-06 09:08:28 +01:00
José Valim
c9d0c05bcc
Custom identity providers (#2301) 2023-10-25 09:44:09 +02:00
José Valim
64dad900d7
Exclude modules from docs (#2218)
Closes #2216.
2023-09-21 12:28:45 +02:00
Alexandre de Souza
3ecc0b3653
Load secrets from Hub when deploying an App (#2098) 2023-07-26 17:39:33 -03:00
Cristine Guadelupe
29b712917e
ZTA - user identity (#2015)
* Get user identity

* Moves current_user_id to identity_data

* Renames cookies to session_identity

* Keep zta keys in the state

* User id from GoogleIap

* Update cloudflare.ex

* Update googleiap.ex

* Email only for ZTA

* Get the current_user_id from the identity_data

* Applying suggestions

* Applying suggestions

* Fix verify_token

---------

Co-authored-by: José Valim <jose.valim@gmail.com>
2023-06-29 23:10:00 +02:00
Cristine Guadelupe
efb28fbdf0
Support Zero Trust authentication (#1938)
Co-authored-by: José Valim <jose.valim@gmail.com>
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2023-06-21 00:25:25 +02:00
Jonatan Kłosko
d0b4f16b19
Improve cookie access check (#1889) 2023-04-28 16:38:17 +02:00
Jonatan Kłosko
8eb93f3e24
Improve cookie access when running in iframe (#1888) 2023-04-28 14:50:40 +02:00
José Valim
f52ff1e9ec
Purge cookies once they exceed 24kB, closes #1832 (#1833) 2023-03-28 17:11:44 +02:00
Jonatan Kłosko
5b5593a54b
Update to Phoenix 1.7 (#1720) 2023-02-22 19:34:54 +01:00
Jonatan Kłosko
4334e8a58e
Add access control to apps (#1715)
Co-authored-by: José Valim <jose.valim@dashbit.co>
2023-02-18 01:16:42 +01:00
José Valim
190a4cffd3
Do not crash when giving token to password and vice-versa (#1574) 2022-12-12 11:52:45 +01:00
Jacques Lorentz
f4e836a5da
Base url path configuration variable (#1549) 2022-11-29 23:34:38 +01:00
José Valim
b8997d6ce2
Use with: :clear_session on bad CSRF tokens 2022-11-22 16:38:49 +01:00
ByeongUk Choi
120eb2d0ef
Redirect after authentication (#1112)
* auth token mode routes /authentication

* redirect after authentication with session

* Apply code review

* Apply suggestions from code review

* Apply suggestions from code review
2022-04-15 14:24:35 +02:00
José Valim
d3ebf42b32
Make disabled auth mode explicit in code (#1114) 2022-04-14 18:39:30 +02:00
ByeongUk Choi
5606326203
Handle token auth under the same /authenticate route as password (#1104)
* auth token mode routes /authentication

* Update lib/livebook_web/controllers/auth_controller.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2022-04-13 18:51:28 +02:00
Jonatan Kłosko
e5e13d86c2
Serve iframes from another local port when running on http (#989)
* Serve iframes from another local port when running on http

* Use relative hostname in local iframe URL

* Simplify server start check

* Use random iframe port when Livebook runs on a random port

* Rename space/ to iframe/

* LivebookWeb.IframePlug -> LivebookWeb.IframeEndpoint
2022-02-08 14:45:58 +01:00
Jonatan Kłosko
4681f98972
Expand directory path when opened via CLI (#976) 2022-02-03 23:43:47 +01:00
Jonatan Kłosko
19baf013d5
Introduce a dedicated channel for JS widget communication (#843)
* Introduce a dedicated channel for JS widget communication

* Handle payload serialization errors

* Tie channel lifetime to the session

* Catch serialization errors instead of encoding twice

* Merge JS static and dynamic outputs

* Authenticate socket connection from session

* Update JS output format

* Remove unused helper

* Apply review comments
2022-01-06 16:31:26 +01:00
Jonatan Kłosko
ac60aba2fb
Make it possible to configure custom plug for all requests (#576)
* Make it possible to configure custom plug for all requests

* Apply review comments

* Use fetch_env!
2021-10-05 00:44:27 +02:00
Jonatan Kłosko
2b2d6c9d50
Show consistent user avatar on initial page load (#349) 2021-06-15 19:33:16 +02:00
Jonatan Kłosko
5c8e117800
Setup user profiles (#253)
* Add initial user config modal

* Assign user ids

* Update session data to hold user ids

* Get users list for specific ids

* Render user avatar

* User update

* Refactor user changes

* Subscribe to individual user updates

* Show users in side panel

* Add sidebar to homepage

* Don't generate the same color twice in a row

* Add documentation notes

* Fix tests

* Add tests

* Keep users in session data

* Rename color to hex_color
2021-05-03 20:03:19 +02:00
José Valim
57047f9c7f
Unify env variables and change auth to use session (#195) 2021-04-15 15:50:29 +02:00
Jakub Perżyło
a9c8e20775
Password access (#187) 2021-04-15 14:15:56 +02:00
Jonatan Kłosko
e9766ed7a5
Introduce token auth and add basic cli configuration (#148)
* Add token authentication

* Restructure CLI

* Allow port configuration

* Further refactoring

* Make sure livebook node starts with unique name

* Improve startup error handling

* Further refactoring

* Add authentication tests

* Add authentication view for entering the token

* Fix auth tests

* Always use random Livebook name for distribution

* Don't enable ANSI on Windows

* Define CLI Task behaviour and move generic logic to the main module

* Generalize convertion from cli arguments to configuration

* Randomly generate secret key base

* Update test/livebook_web/plugs/auth_plug_test.exs

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Override app config in persistent manner

* Update lib/litebook_cli.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Move auth error to ErrorView

* Unify node name configuration and allow it via CLI

* Set all applications configs at once

* Move token generation to application.ex to work outside CLI

* Clean up overriding configuration

* Store auth token in separate cookies

* Update lib/livebook_cli/server.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Update lib/livebook_web/endpoint.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Update lib/livebook_web/plugs/auth_plug.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-04-08 11:41:52 +02:00
Jonatan Kłosko
90e7941fe4
Redesign (#80)
* Update cell actions

* Add new focus indicator

* Update headings typography

* Update cell actions and insert buttons

* Add sidebar menu

* Add settings modal

* Update homepage

* Update settings dialog

* Rename classes

* Add floating menu

* Update icon colors on hover

* Fix homepage tests

* Format assets source

* Update monaco editor

* Fix editor width on resize

* Add more padding to the notebook content

* Update settings dialog title

* Show reevaluate button when the cell is in evaluated state

* Show section actions on focus or hover only

* Pre-fill runtime selector with the current configuration

* Ignore cmd + enter in Markdown cells
2021-03-20 14:10:15 +01:00
Jonatan Kłosko
8b37e32e3a
Escript (#77)
* Set up Escript packaging

* Use MD5 digest sa ETAG

* Make sure changes to the static files recompile the relevant module

* Manually start the application in Escript

* Set up basic CLI

* Run formatter

* Start Elixir app before anything else

* Improve version output

* Build Escript to project root directory

* Improve assets handling

* Move plug related modules under plugs directory

* Include bundled assets in the repository

* Use the same plug with different static providers in prod and dev

* Refactor providers

* Rename StaticProvidedPlug to StaticPlug
2021-03-17 01:53:44 +01:00