From 0ff1b8d19ce7b81ebdace200eeb9de70a6255f3e Mon Sep 17 00:00:00 2001 From: Ed Bond Date: Wed, 27 Mar 2024 17:41:35 -0500 Subject: [PATCH] Bug fix ZTA (#2533) --- lib/livebook/config.ex | 2 +- test/livebook/config_test.exs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/livebook/config.ex b/lib/livebook/config.ex index d075da0cf..ab08e415f 100644 --- a/lib/livebook/config.ex +++ b/lib/livebook/config.ex @@ -705,7 +705,7 @@ defmodule Livebook.Config do provider -> with [type, key] <- String.split(provider, ":", parts: 2), %{^type => module} <- identity_provider_type_to_module() do - {module, key} + {:zta, module, key} else _ -> abort!("invalid configuration for identity provider given in #{env}") end diff --git a/test/livebook/config_test.exs b/test/livebook/config_test.exs index 785712831..4feb4fe18 100644 --- a/test/livebook/config_test.exs +++ b/test/livebook/config_test.exs @@ -43,6 +43,11 @@ defmodule Livebook.ConfigTest do assert Config.identity_provider!("TEST_IDENTITY_PROVIDER") == {:custom, LivebookWeb.SessionIdentity, "extra"} end) + + with_env([TEST_IDENTITY_PROVIDER: "cloudflare:123"], fn -> + assert Config.identity_provider!("TEST_IDENTITY_PROVIDER") + {:zta, Livebook.ZTA.Cloudflare, "123"} + end) end end