diff --git a/.gitignore b/.gitignore index 4804240ad..e5f90ad0f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,8 @@ priv/data/* !priv/data/.gitkeep priv/errors/* !priv/errors/.gitkeep +priv/cert/* +!priv/cert/.gitkeep .vscode/ cover/ site/ diff --git a/js/src/utils/auth.ts b/js/src/utils/auth.ts index 52354432a..169faccdf 100644 --- a/js/src/utils/auth.ts +++ b/js/src/utils/auth.ts @@ -128,4 +128,5 @@ export const SELECTED_PROVIDERS: { [key: string]: string } = { google: "Google", keycloak: "Keycloak", ldap: "LDAP", + saml: "SAML", }; diff --git a/mix.exs b/mix.exs index 000924be5..75369c5fd 100644 --- a/mix.exs +++ b/mix.exs @@ -131,6 +131,7 @@ defmodule Mobilizon.Mixfile do {:ueberauth_facebook, "~> 0.8"}, {:ueberauth_discord, "~> 0.5"}, {:ueberauth_google, "~> 0.9"}, + {:ueberauth_saml, github: "wrren/ueberauth_saml"}, {:ueberauth_keycloak_strategy, git: "https://github.com/tcitworld/ueberauth_keycloak.git", branch: "upgrade-deps"}, {:ueberauth_gitlab_strategy, diff --git a/mix.lock b/mix.lock index 9123929f6..7a8bda47a 100644 --- a/mix.lock +++ b/mix.lock @@ -34,6 +34,7 @@ "elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "erlsom": {:hex, :erlsom, "1.5.0", "c5a5cdd0ee0e8dca62bcc4b13ff08da24fdefc16ccd8b25282a2fda2ba1be24a", [:rebar3], [], "hexpm", "55a9dbf9cfa77fcfc108bd8e2c4f9f784dea228a8f4b06ea10b684944946955a"}, + "esaml": {:git, "git://github.com/wrren/esaml.git", "59e9d5c628f8003f2d43b2476cde02c3cd0dae08", [branch: "ueberauth_saml"]}, "eternal": {:hex, :eternal, "1.2.2", "d1641c86368de99375b98d183042dd6c2b234262b8d08dfd72b9eeaafc2a1abd", [:mix], [], "hexpm", "2c9fe32b9c3726703ba5e1d43a1d255a4f3f2d8f8f9bc19f094c7cb1a7a9e782"}, "ex_cldr": {:hex, :ex_cldr, "2.20.0", "571a4b490c333809be59cc984a21be2deaab1db9e2418e323d5935aec8b1394a", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.15", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "06147e4a27be62e6fe92db14cf5048c645927bfc530aa1cc6af8c92d65e32427"}, "ex_cldr_calendars": {:hex, :ex_cldr_calendars, "1.13.0", "6bea6f3c54d74c0ed131dd17e1cff68e02b7053f24c2fac91f129e5221ff723a", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:earmark, "~> 1.0", [hex: :earmark, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.17", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_cldr_units, "~> 3.5", [hex: :ex_cldr_units, repo: "hexpm", optional: true]}, {:ex_doc, "~> 0.21", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "d07ab6b2164b6a0861de6ecb600747aab61c94a0b9c001e36c2e0b731eeb567a"}, @@ -135,8 +136,10 @@ "ueberauth_gitlab_strategy": {:git, "https://github.com/tcitworld/ueberauth_gitlab.git", "9fc5d30b5d87ff7cdef293a1c128f25777dcbe59", [branch: "upgrade-deps"]}, "ueberauth_google": {:hex, :ueberauth_google, "0.10.0", "ae00e7228207be977d5cdd0a562e39961851cea74f513aab6446cb51468f283c", [:mix], [{:oauth2, "~> 1.0 or ~> 2.0", [hex: :oauth2, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.6.3", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "148e2575fd24a29b8bcaa44f9d3d1a38550a74ceed645f5059d4516b93992650"}, "ueberauth_keycloak_strategy": {:git, "https://github.com/tcitworld/ueberauth_keycloak.git", "d892f0f9daf9e0023319b69ac2f7c2c6edff2b14", [branch: "upgrade-deps"]}, + "ueberauth_saml": {:git, "https://github.com/wrren/ueberauth_saml.git", "7d6b0d96a1d32faa9f33063cf7fb83df151703b0", []}, "ueberauth_twitter": {:hex, :ueberauth_twitter, "0.4.0", "4b98620341bc91bac90459093bba093c650823b6e2df35b70255c493c17e9227", [:mix], [{:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:oauther, "~> 1.1", [hex: :oauther, repo: "hexpm", optional: false]}, {:ueberauth, "~> 0.6", [hex: :ueberauth, repo: "hexpm", optional: false]}], "hexpm", "fb29c9047ca263038c0c61f5a0ec8597e8564aba3f2b4cb02704b60205fd4468"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, "unsafe": {:hex, :unsafe, "1.0.1", "a27e1874f72ee49312e0a9ec2e0b27924214a05e3ddac90e91727bc76f8613d8", [:mix], [], "hexpm", "6c7729a2d214806450d29766abc2afaa7a2cbecf415be64f36a6691afebb50e5"}, + "uuid": {:git, "git://github.com/botsunit/erlang-uuid", "1effbbbd200f9f5d9d5154e81b83fe8e4c3fe714", [branch: "master"]}, "xml_builder": {:hex, :xml_builder, "2.1.4", "e60e21c0a39b9dd8dec1db5a2525c713f7fe4e85ed247caedf22a9bcdd2d5069", [:mix], [], "hexpm", "48188a4df8b9168ceb8318d128299bce064d272e18967349b2592347c434e677"}, } diff --git a/priv/cert/.gitkeep b/priv/cert/.gitkeep new file mode 100644 index 000000000..e69de29bb