Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Changes for multitenancy dashboard #963

Merged
merged 40 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0f8cfac
feat: Add an API to fetch the list of core config properties (#922)
prateek3255 Feb 28, 2024
0267bf2
Merge with base branch
prateek3255 Mar 13, 2024
6dc4f22
Merge with 9.0
prateek3255 Mar 14, 2024
f2b7192
Merge branch '9.0' into feat/multitenancy-dashboard
prateek3255 Mar 18, 2024
91d689b
Merge branch '9.0' into merge-latest
sattvikc Apr 10, 2024
a54190c
Merge pull request #980 from supertokens/merge-latest
sattvikc Apr 10, 2024
34b26df
fix: core config list
sattvikc Apr 10, 2024
9c337b2
fix: serialize nulls
sattvikc Apr 11, 2024
3f3394e
fix: is nullable
sattvikc Apr 11, 2024
f9e305a
fix: plugin configs
sattvikc Apr 11, 2024
ed7360a
Merge branch '9.0' into feat/multitenancy-dashboard
sattvikc Apr 23, 2024
0eda7fe
fix: add new booleans for core config
sattvikc May 2, 2024
f22f97d
fix: cleanup
sattvikc May 2, 2024
4a0c6e0
fix: list apis
sattvikc May 2, 2024
503baa4
fix: refactor config description
sattvikc May 2, 2024
6af95b0
fix: refactor cud tests
sattvikc May 3, 2024
edbf1de
fix: refactor tests
sattvikc May 3, 2024
849a0f6
fix: tests
sattvikc May 3, 2024
ce9f173
fix: type fix
sattvikc May 3, 2024
8d85f7b
fix: flag setting for thirdparty providers
sattvikc May 3, 2024
046a244
fix: pr comments
sattvikc May 7, 2024
7f2a091
fix: pr comments
sattvikc May 7, 2024
0673de5
fix: pr comments
sattvikc May 7, 2024
00999a0
fix: pr comments
sattvikc May 10, 2024
5aacb67
fix: revert
sattvikc May 10, 2024
7306c7c
fix: tenant tests
sattvikc May 13, 2024
5c079fd
fix: app tests
sattvikc May 13, 2024
356160a
fix: cud tests
sattvikc May 13, 2024
6f45f91
fix: other tests
sattvikc May 13, 2024
96cc96d
fix: version and changelog
sattvikc May 13, 2024
7c274e0
fix: inmemory
sattvikc May 14, 2024
3bc49e3
fix: skip deprecated
sattvikc May 16, 2024
dc30205
fix: dashboard updates
sattvikc May 20, 2024
bd3a8a1
fix: minor fixes
sattvikc May 23, 2024
3181e23
fix: tests
sattvikc May 23, 2024
b7a0ec8
Merge branch '9.0' into feat/multitenancy-dashboard
sattvikc May 23, 2024
9ac9a13
fix: refactor
sattvikc May 24, 2024
735bf7e
fix: refactor
sattvikc May 24, 2024
25927ba
fix: changelog
sattvikc May 24, 2024
42b42d1
fix: refactor
sattvikc May 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## [9.1.0] - 2024-05-24

- Adds new core API for fetching all the core properties for a tenant
- GET `/appid-<appid>/<tenantid>/recipe/dashboard/tenant/core-config`
- Deprecated the following APIs
- PUT `/recipe/multitenancy/connectionuridomain`
- GET `/recipe/multitenancy/connectionuridomain/list`
- PUT `/recipe/multitenancy/app`
- GET `/recipe/multitenancy/app/list`
- PUT `/appid-<appid>/recipe/multitenancy/tenant`
- GET `/appid-<appid>/<tenantid>/recipe/multitenancy/tenant`
- GET `/appid-<appid>/<tenantid>/recipe/multitenancy/tenant/list`
- Adds the following APIs to replace the deprecated APIs
- PUT `/recipe/multitenancy/connectionuridomain/v2`
- GET `/recipe/multitenancy/connectionuridomain/list/v2`
- PUT `/recipe/multitenancy/app/v2`
- GET `/recipe/multitenancy/app/list/v2`
- PUT `/appid-<appid>/recipe/multitenancy/tenant/v2`
- GET `/appid-<appid>/<tenantid>/recipe/multitenancy/tenant/v2`
- GET `/appid-<appid>/<tenantid>/recipe/multitenancy/tenant/list/v2`
- Backward compatible recipe enabled boolean computations based on - https://github.com/supertokens/supertokens-core/issues/979#issuecomment-2099971371

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema changes + migration of schema + changes to multi tenancy + changes to how you configure a tenant

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release prep at the end

## [9.0.2] - 2024-04-17

- Fixes issue with core startup when creation of CUD/app/tenant has partial failure
Expand Down Expand Up @@ -1403,6 +1427,7 @@ This script updates the `phone_number` column in the `passwordless_users`, `pass

```sql
-- helper stored procedures
DELIMITER //

CREATE PROCEDURE st_drop_all_fkeys()
BEGIN
Expand Down Expand Up @@ -1459,7 +1484,7 @@ This script updates the `phone_number` column in the `passwordless_users`, `pass
END LOOP;

CLOSE dropCur;
END
END //

--

Expand Down Expand Up @@ -1518,7 +1543,7 @@ This script updates the `phone_number` column in the `passwordless_users`, `pass
END LOOP;

CLOSE dropCur;
END
END //

--

Expand Down Expand Up @@ -1577,7 +1602,7 @@ This script updates the `phone_number` column in the `passwordless_users`, `pass
END LOOP;

CLOSE dropCur;
END
END //

--

Expand Down Expand Up @@ -1636,7 +1661,7 @@ This script updates the `phone_number` column in the `passwordless_users`, `pass
END LOOP;

CLOSE dropCur;
END
END //

--

Expand Down Expand Up @@ -1668,8 +1693,9 @@ This script updates the `phone_number` column in the `passwordless_users`, `pass
execute add_column_sql;
SELECT 'Column Successfully Created!' INTO p_status_message;
END IF;
END
END //

DELIMITER ;
-- Drop constraints and indexes

CALL st_drop_all_fkeys();
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ compileTestJava { options.encoding = "UTF-8" }
// }
//}

version = "9.0.2"
version = "9.1.0"


repositories {
Expand Down
4 changes: 2 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ core_config_version: 0
# password_reset_token_lifetime:


# (DIFFERENT_ACROSS_TENANTS | OPTIONAL | Default: 86400000 (1 day)) long value. Time in milliseconds for how long an
# (DIFFERENT_ACROSS_TENANTS | OPTIONAL | Default: 86400000 (1 day)) long value. Time in milliseconds for how long an
# email verification token / link is valid for.
# email_verification_token_lifetime:

Expand Down Expand Up @@ -139,7 +139,7 @@ core_config_version: 0

# (OPTIONAL | Default: null). This is used when deploying the core in SuperTokens SaaS infrastructure. If set, limits
# what database information is shown to / modifiable by the dev when they query the core to get the information about
# their tenants. It only exposes that information when this key is used instead of the regular api_keys config.
# their tenants. It only exposes that information when this key is used instead of the regular api_keys config.
# supertokens_saas_secret:

# (DIFFERENT_ACROSS_APPS | OPTIONAL | Default: null). This is used when the core needs to assume a specific CDI version
Expand Down
3 changes: 2 additions & 1 deletion coreDriverInterfaceSupported.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"2.21",
"3.0",
"4.0",
"5.0"
"5.0",
"5.1"
]
}
4 changes: 2 additions & 2 deletions devConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ core_config_version: 0
# password_reset_token_lifetime:


# (DIFFERENT_ACROSS_TENANTS | OPTIONAL | Default: 86400000 (1 day)) long value. Time in milliseconds for how long an
# (DIFFERENT_ACROSS_TENANTS | OPTIONAL | Default: 86400000 (1 day)) long value. Time in milliseconds for how long an
# email verification token / link is valid for.
# email_verification_token_lifetime:

Expand Down Expand Up @@ -140,7 +140,7 @@ disable_telemetry: true

# (OPTIONAL | Default: null). This is used when deploying the core in SuperTokens SaaS infrastructure. If set, limits
# what database information is shown to / modifiable by the dev when they query the core to get the information about
# their tenants. It only exposes that information when this key is used instead of the regular api_keys config.
# their tenants. It only exposes that information when this key is used instead of the regular api_keys config.
# supertokens_saas_secret:

# (DIFFERENT_ACROSS_APPS | OPTIONAL | Default: null). This is used when the core needs to assume a specific CDI version
Expand Down
11 changes: 7 additions & 4 deletions ee/src/main/java/io/supertokens/ee/EEFeatureFlag.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,15 @@ private JsonObject getMultiTenancyStats()
}
{
boolean hasEnterpriseLogin = false;
for (ThirdPartyConfig.Provider provider : tenantConfig.thirdPartyConfig.providers) {
if (isEnterpriseThirdPartyId(provider.thirdPartyId)) {
hasEnterpriseLogin = true;
break;
if (tenantConfig.thirdPartyConfig.providers != null) {
for (ThirdPartyConfig.Provider provider : tenantConfig.thirdPartyConfig.providers) {
if (isEnterpriseThirdPartyId(provider.thirdPartyId)) {
hasEnterpriseLogin = true;
break;
}
}
}

tenantStat.addProperty("hasEnterpriseLogin", hasEnterpriseLogin);
}

Expand Down
2 changes: 1 addition & 1 deletion pluginInterfaceSupported.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_comment": "contains a list of plugin interfaces branch names that this core supports",
"versions": [
"6.1"
"6.2"
]
}
Loading
Loading