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

Bump carbon.identity-inbound-auth-oauth.version from 6.4.2 to 6.4.21 #104

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
53c3166
generate rest api for global scopes
dushaniw Jan 24, 2020
061d65f
generate rest api for global scopes
dushaniw Jan 24, 2020
f179d90
Change scope ID to String to support Global Scope UUID.
dushaniw Jan 29, 2020
24dc83e
Change scope ID to String to support Global Scope UUID.
dushaniw Jan 29, 2020
dce0965
add feign client
dushaniw Feb 3, 2020
a2d11ab
Implement global scope REST API service
dushaniw Feb 3, 2020
d9dda95
Add scope management IS service client
dushaniw Feb 3, 2020
1cc4f1e
Add global scope management implementation
dushaniw Feb 3, 2020
ac905cd
Add global scope db scripts
dushaniw Feb 3, 2020
915c903
Add global scope db support
dushaniw Feb 3, 2020
7e16cc1
Add error decoder
dushaniw Feb 3, 2020
e75df31
Add register scope implementation
dushaniw Feb 3, 2020
780de3e
update binding type example value
dushaniw Feb 8, 2020
88fb766
Add Global Scope REST API
dushaniw Feb 8, 2020
f018bdf
Add Primary Key AM_GLOBAL_SCOPE
dushaniw Feb 8, 2020
a452c8d
Remove openfeign
dushaniw Feb 8, 2020
648020a
Add global scope manage REST API Scope
dushaniw Feb 8, 2020
3802f7a
Remove fiegn client for scopemanagement
dushaniw Feb 8, 2020
8d71a2c
Add scope management methods
dushaniw Feb 8, 2020
c712ebc
Initialize HttpClient for KM
dushaniw Feb 8, 2020
a7ebc5e
remove scopebindings dto
dushaniw Feb 8, 2020
f4be16f
Add scope management dao
dushaniw Feb 8, 2020
7256a2d
Add scope management implementation layer
dushaniw Feb 8, 2020
82c7f31
Update GlobalScope REST API layer
dushaniw Feb 8, 2020
c86a117
handle 404 in isScopeExists usecase
dushaniw Feb 10, 2020
6d4d844
update binding type example
dushaniw Feb 10, 2020
a861552
attach scope to resource
dushaniw Feb 11, 2020
a367722
Add Scope Mgt DAO
dushaniw Feb 11, 2020
ab8dcd4
Remove feign dependencies
dushaniw Apr 5, 2020
ff556d0
Add SCOPE_NAME to RESOURCE_SCOPE_MAPPING table.
dushaniw Apr 5, 2020
30b1c4b
Add SCOPE_NAME, TENANT_ID to RESOURCE_SCOPE_MAPPING table.
dushaniw Apr 5, 2020
2994627
Update scope existence validation logic.
dushaniw Apr 5, 2020
3ea9873
Fix unit test failures
dushaniw Apr 8, 2020
e8c5372
fix IDN_OAUTH2_RESOURCE_SCOPE table
dushaniw Apr 8, 2020
b74364b
add detachScopeFromKM extension point to KM implementation
dushaniw Apr 8, 2020
dd25989
Update Scopes SQL Queries
dushaniw Apr 8, 2020
5b3b886
Update Scopes SQL Queries
dushaniw Apr 8, 2020
4bd3dab
Add detach scope implementation
dushaniw Apr 8, 2020
2225515
update isScopeExists method changes
dushaniw Apr 8, 2020
f3c2f20
add km management application table to keep the OAuth App info for ea…
dushaniw Apr 15, 2020
6dfde6c
Add isGlobal field to ScopeDTO to identify the scope as a global scop…
dushaniw Apr 15, 2020
9ad1063
Only show the local scopes by filtering from API.Scopes[x].isGlobal.
dushaniw Apr 15, 2020
d0eb320
set isGlobal value when retrieving global scopes and APIs
dushaniw Apr 15, 2020
4750171
check if scope attachments present when deleting global scopes
dushaniw Apr 15, 2020
840123d
Check if scope key in request payload is an already defined global sc…
dushaniw Apr 15, 2020
13371b0
Add WSO2ISKeyManagerImpl for usecases when WSO2 IS is used as the aut…
dushaniw Apr 15, 2020
e9d4d83
Add KMConfigDeployer to provision OAuth app when each tenant is loading.
dushaniw Apr 15, 2020
76bc4a8
Provision OAuth in KeyManager for super tenant.
dushaniw Apr 15, 2020
a29d2fb
Register KMConfigDeployer to bundle context
dushaniw Apr 15, 2020
5fc9a0f
Register OAuth Application by calling DCR endpoint when APIM is used …
dushaniw Apr 15, 2020
abd0112
Add KM constants.
dushaniw Apr 15, 2020
46812c5
Add KMRegisterProfileDTO to exchange payload info for DCR request.
dushaniw Apr 15, 2020
a5655e1
Add KM Application DAO methods.
dushaniw Apr 15, 2020
69217e6
Add KMApplicationDAO changes
dushaniw Apr 15, 2020
6ebdb95
Add register KM Application method interface.
dushaniw Apr 15, 2020
cb5dbb9
remove unused import
dushaniw Apr 15, 2020
a4caaf9
Add isScopeKeyAssignedToAPI method to check whether the scope key ass…
dushaniw Apr 15, 2020
14269bd
Add GetGlobalScopeByName and GetAllGlobalScopeKeys for tenant methods.
dushaniw Apr 15, 2020
2b8a2c9
Add isScopeAssignedToAPI Implementation.
dushaniw Apr 15, 2020
53aea99
Remove duplicate scope check.
dushaniw Apr 15, 2020
17e853c
Fix scopes issue in creating new version of API.
dushaniw Apr 15, 2020
1a42dbe
Add GetAllGlobalScopeKeys and GetGlobalScopeByName implementations.
dushaniw Apr 15, 2020
387f8b6
Fix formatting issues.
dushaniw Apr 15, 2020
d114766
Add DAO Changes related to scope management.
dushaniw Apr 15, 2020
76dce15
Add Scope management related SQL queries.
dushaniw Apr 15, 2020
2721bc5
Fix formatting and minor issues.
dushaniw Apr 15, 2020
0092ea6
Fix formatting.
dushaniw Apr 15, 2020
b083a81
Fix code formatting.
dushaniw Apr 15, 2020
18b2e21
remove feign import
dushaniw Apr 15, 2020
8d68e93
string Ids are compared using .equals()
dushaniw Apr 15, 2020
beccf94
minor formatting
dushaniw Apr 15, 2020
1b99fbc
Move Scope DTO to impl.dto package and rename to ScopeDTO.
dushaniw Apr 15, 2020
c2fafb3
Remove unused class
dushaniw Apr 15, 2020
3f4a681
add serial version uid
dushaniw Apr 15, 2020
d4df4b4
add private constructor
dushaniw Apr 15, 2020
c29b10f
fix formatting
dushaniw Apr 15, 2020
88d4834
Fix minor formatting.
dushaniw Apr 15, 2020
eb9ed42
Add java doc @Override annotation
dushaniw Apr 15, 2020
d69e78f
Fix formatting
dushaniw Apr 15, 2020
c2194c2
Fix minor formatting.
dushaniw Apr 15, 2020
e0d1919
Fix minor formatting and add missing java docs.
dushaniw Apr 15, 2020
e97d6d1
Fix FakeKeyManagerForTest
dushaniw Apr 15, 2020
bb4ce34
Fix formatting.
dushaniw Apr 16, 2020
e39799a
Add debug logs before getting all global scopes.
dushaniw Apr 16, 2020
c57976a
Handle errors for global scopes.
dushaniw Apr 16, 2020
4c75042
Adding debug logs
dushaniw Apr 16, 2020
7805d85
Add logs for KM OAuth app registration.
dushaniw Apr 16, 2020
e6caf47
Change isScopeExists method to first check global scope table and if …
dushaniw Apr 16, 2020
fdb2c50
update local scope adding logic.
dushaniw Apr 16, 2020
8b24442
skip throwing error when scope already exists in KM when creating new…
dushaniw Apr 16, 2020
a56204b
Change isScope exists and isScopeAttached queries.
dushaniw Apr 17, 2020
ea64278
Move super tenant name and id to constant.
dushaniw Apr 17, 2020
22f77ce
Rename KMApplicationDAO -> KeyMgtDAO.addApplication
dushaniw Apr 17, 2020
9c1fec2
Fix ServerStartupListener with proper naming conventions.
dushaniw Apr 17, 2020
2b07d10
Add proper naming convensions.
dushaniw Apr 17, 2020
7eed3c3
Remove registerOAuthApp extension.
dushaniw Apr 17, 2020
15e54cc
Move the duplicate logic to seperate keymgt service class.
dushaniw Apr 17, 2020
98acb4d
Rename class names and methods according to convention.
dushaniw Apr 17, 2020
3a0c65e
remove initialAutoCommit static variable access.
dushaniw Apr 17, 2020
e8535fe
Remove null check as statement.executeQuery never returns null.
dushaniw Apr 17, 2020
7449423
Pass scope name to delete global scope.
dushaniw Apr 17, 2020
1cf699a
Rename /global-scopes to /scopes
dushaniw Apr 17, 2020
766be73
rename global to shared scopes.
dushaniw Apr 19, 2020
02e38a2
Rename Global Scope -> Shared Scope
dushaniw Apr 20, 2020
29f73af
Add pagination to /scopes REST API.
dushaniw Apr 20, 2020
acd2f88
Remove bindings object from ScopeDTO and add bindings array for roles.
dushaniw Apr 21, 2020
e6a40f7
remove primary key temporarily.
dushaniw Apr 22, 2020
70d6711
update scope detachment by passing context seperately
dushaniw Apr 22, 2020
0e9af4e
relfect isShared field changes in APIDTO
dushaniw Apr 22, 2020
78c794d
Fix eslint issues
dushaniw Apr 22, 2020
3f664dc
detach resource scope using resourse path
dushaniw Apr 22, 2020
75321f9
add support for multiple scopes per resource.
dushaniw Apr 22, 2020
2ba6d1f
fix scope.id null issue when checking equality of two scope objects.
dushaniw Apr 23, 2020
621dd06
fix issue of not deleting local scopes during API delete if the same …
dushaniw Apr 23, 2020
a54b289
support multiple scopes per resource when legacy scope extenation x-s…
dushaniw Apr 23, 2020
9fcaca1
Return boolean primitive type for isScopeExists()
dushaniw Apr 24, 2020
efb6f58
fix keymanager impl wrapper test class issues.
dushaniw Apr 24, 2020
579fd3c
fix formatting.
dushaniw Apr 24, 2020
26e4061
Remove only unversioned scopes during API update.
dushaniw Apr 24, 2020
96e6f44
Fix review comment. Revert APIManager API change.
dushaniw Apr 26, 2020
83c69e8
Revert API change.
dushaniw Apr 26, 2020
19dbb52
Fix isScopeExits testcase
dushaniw Apr 26, 2020
b8ecf2a
Fix impl test failures.
dushaniw Apr 26, 2020
97d9f86
Handle null in connection rollbacks.
dushaniw Apr 26, 2020
99ec5fc
Fix checkstyle issues.
dushaniw Apr 26, 2020
ddfc859
fix return value isSharedScopeNameExists
dushaniw Apr 26, 2020
f752e93
fix checkstyle issues.
dushaniw Apr 26, 2020
e34ff46
Fix publisher swagger issue of having similar paths /scopes/{scopeId}…
dushaniw Apr 26, 2020
a6f8402
remove unnecessary null checks for resultset. Add notes to methods fo…
dushaniw Apr 26, 2020
07d3f60
Fix publisher REST API /scopes/{scopeId} HEAD
dushaniw Apr 27, 2020
559ee7d
handle connection rollback for URItemplate removal in update.
dushaniw Apr 27, 2020
b803b6f
fix api delete issue.
dushaniw Apr 27, 2020
88ce674
rename isShared -> shared
dushaniw Apr 28, 2020
cf5136c
Add KM extension to validate global scopes while attaching them to APIs.
dushaniw Apr 28, 2020
ca68561
seperate local scope existence validation and registration logic.
dushaniw Apr 28, 2020
f6a2952
Add resource scope attach, detach and update extension points to KM i…
dushaniw Apr 28, 2020
7e5684a
Seperate KM service calls from ApiMgtDAO layer.
dushaniw Apr 28, 2020
99bd051
Fix review comments.
dushaniw Apr 30, 2020
e64d72a
Move getAPIScopes to APIUtil so that KM call will not be done from DA…
dushaniw May 4, 2020
f1f70e2
Remove preserveLegacyScope property. Make legacy scope migration mand…
dushaniw May 4, 2020
2a5e6c6
Remove getAllSharedScopes DAO.
dushaniw May 4, 2020
5410a89
Add DisplayName to ScopeDTO in publisher REST API. Keep display name …
dushaniw May 4, 2020
a9bef74
Add TODO for multiple scope per resource support in Basic Auth Gateway.
dushaniw May 4, 2020
4cf874e
Fix review comments. Add specific field names to SELECT queries.
dushaniw May 4, 2020
a70d187
Fix get scope id using scope name.
dushaniw May 4, 2020
49e1399
remove tenantId parameter for api update.
dushaniw May 5, 2020
487421b
remove preserve legacy extension.
dushaniw May 5, 2020
d579927
Fix tests.
dushaniw May 5, 2020
5982260
add validation for scope display name. When display is not provided, …
dushaniw May 5, 2020
d98a0df
fix tests.
dushaniw May 5, 2020
1cef0c3
Fix issues when retrieving shared scopes and searching paginated apis.
dushaniw May 6, 2020
132ede1
Get versioned local scopes and remove them from the old local scope s…
dushaniw May 7, 2020
7e907f3
Add resource scope to URITemplate.scopes array.
dushaniw May 7, 2020
e03d4bc
Add APIScopeDTO to APIProductDTO.
dushaniw May 7, 2020
106fd70
Fix issue of returning scopes in uri templates for creation new versi…
dushaniw May 8, 2020
4df15a3
fix issue when loading scopes for Operations in GraphQL.
dushaniw May 8, 2020
8c45b17
remove AM_API_SCOPES table.
dushaniw May 9, 2020
6c76f34
remove AM_API_SCOPES table and add shared scope tables for test cases.
dushaniw May 9, 2020
795a8ad
remove oauth2 scope resource path primary key constraint.
dushaniw May 9, 2020
1782c2c
fix review comment : remove initializeHttpClient from KeyManager Inte…
dushaniw May 10, 2020
f079ddf
Fix comments and javadoc comments.
dushaniw May 10, 2020
1ba7fe2
Bump carbon.identity-inbound-auth-oauth.version from 6.4.2 to 6.4.21
dependabot-preview[bot] May 11, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
public abstract class APIDefinition {

private static final Pattern CURLY_BRACES_PATTERN = Pattern.compile("(?<=\\{)(?!\\s*\\{)[^{}]+");
public static final String KEEP_LEGACY_EXTENSION_PROP = "preserveLegacyExtensions";

/**
* This method generates Mock/Sample payloads for API prototyping
Expand Down Expand Up @@ -147,16 +146,6 @@ public abstract APIDefinitionValidationResponse validateAPIDefinition(String api
public abstract String populateCustomManagementInfo(String oasDefinition, SwaggerData swaggerData)
throws APIManagementException;

/**
* Check extension migration is disabled
*
* @return boolean
*/
protected boolean isLegacyExtensionsPreserved() {
String keepLegacyExtension = System.getProperty(KEEP_LEGACY_EXTENSION_PROP);
return Boolean.parseBoolean(keepLegacyExtension);
}

/**
* Update the OAS definition for API consumers
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,34 @@ Map<Integer, APIKey> searchAccessToken(String searchType, String searchTerm, Str
* @param tenantid tenant id
* @return true if the scope key is already available
* @throws APIManagementException if failed to check the context availability
* @deprecated Use isScopeKeyAssignedLocally() instead.
*/
@Deprecated
boolean isScopeKeyAssigned(APIIdentifier identifier, String scopeKey, int tenantid) throws APIManagementException;

/**
* Check whether the given scope key is already assigned to any API under given tenant.
*
* @param scopeKey Scope
* @param tenantDomain Tenant Domain
* @return true if scope is attached to an API
* @throws APIManagementException if failed to check the assignment
*/
boolean isScopeKeyAssignedToAPI(String scopeKey, String tenantDomain) throws APIManagementException;

/**
* Check whether the given scope key is already assigned to an API as local scope under given tenant.
* This will return false if those APIs are different versions of the same API.
*
* @param apiIdentifier API Identifier
* @param scopeKey candidate scope key
* @param tenantId tenant Id
* @return true if the scope key is already attached as a local scope in any API
* @throws APIManagementException if failed to check the local scope availability
*/
boolean isScopeKeyAssignedLocally(APIIdentifier apiIdentifier, String scopeKey, int tenantId)
throws APIManagementException;

/**
* Check if a given context template already exists
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1328,4 +1328,79 @@ List<APIResource> getResourcesToBeRemovedFromAPIProducts(APIIdentifier apiId, St
* @return List of removed resources that are reused among API Products
*/
List<APIResource> getRemovedProductResources(Set<URITemplate> updatedUriTemplates, API existingAPI);

/**
* Check whether the given scope name exists as a shared scope in the tenant domain.
*
* @param scopeName Shared Scope name
* @param tenantDomain Tenant Domain
* @return Scope availability
* @throws APIManagementException if failed to check the availability
*/
boolean isSharedScopeNameExists(String scopeName, String tenantDomain) throws APIManagementException;

/**
* Add a shared scope.
*
* @param scope Shared Scope
* @param tenantDomain Tenant domain
* @return UUID of the added Shared Scope
* @throws APIManagementException if failed to add a scope
*/
String addSharedScope(Scope scope, String tenantDomain) throws APIManagementException;

/**
* Get all available shared scopes.
*
* @param tenantDomain tenant domain
* @return Shared Scope list
* @throws APIManagementException if failed to get the scope list
*/
List<Scope> getAllSharedScopes(String tenantDomain) throws APIManagementException;

/**
* Get all available shared scope keys.
*
* @param tenantDomain tenant domain
* @return Shared Scope Keyset
* @throws APIManagementException if failed to get the scope key set
*/
Set<String> getAllSharedScopeKeys(String tenantDomain) throws APIManagementException;

/**
* Get shared scope by UUID.
*
* @param sharedScopeId Shared scope Id
* @param tenantDomain tenant domain
* @return Shared Scope
* @throws APIManagementException If failed to get the scope
*/
Scope getSharedScopeByUUID(String sharedScopeId, String tenantDomain) throws APIManagementException;

/**
* Delete shared scope.
*
* @param scopeName Shared scope name
* @param tenantDomain tenant domain
* @throws APIManagementException If failed to delete the scope
*/
void deleteSharedScope(String scopeName, String tenantDomain) throws APIManagementException;

/**
* Update a shared scope.
*
* @param sharedScope Shared Scope
* @param tenantDomain tenant domain
* @throws APIManagementException If failed to update
*/
void updateSharedScope(Scope sharedScope, String tenantDomain) throws APIManagementException;

/**
* Validate a shared scopes set. Add the additional attributes (scope description, bindings etc).
*
* @param scopes Shared scopes set
* @param tenantDomain Tenant domain
* @throws APIManagementException If failed to validate
*/
void validateSharedScopes(Set<Scope> scopes, String tenantDomain) throws APIManagementException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,19 @@ public enum ExceptionCodes implements ErrorHandler {
"exist"),
BLOCK_CONDITION_ALREADY_EXISTS(900979, "The Block Condition exists.", 409, " The Block Condition already exists"),
SYSTEM_APP_NOT_FOUND(900980, "System Application not found", 409, "System Application not found"),
SCOPE_NOT_FOUND(900981, "Scope not found", 404, "Scope could not be found"),
SCOPE_ALREADY_REGISTERED(900982, "Scope already exist", 409, "Scope already exist"),
SCOPE_DELETE_FAILED(900983, "Scope couldn't get deleted", 400, "Scope couldn't get deleted"),
SCOPE_REGISTRATION_FAILED(900984, "Scope registration failed", 400, "Scope registration failed"),
SCOPE_VALIDATION_FAILED(900985, "Scope validation failed", 412, "Scope validation failed"),

SHARED_SCOPE_NOT_FOUND(900981, "Shared Scope not found", 404,
"Requested Shared Scope ID %s could not be found"),
SHARED_SCOPE_ID_NOT_SPECIFIED(900982, "Shared Scope ID not specified", 400,
"Shared Scope ID not specified"),
SHARED_SCOPE_NAME_NOT_SPECIFIED(900983, "Shared Scope name not specified", 400,
"Shared Scope name not specified"),
SCOPE_ALREADY_REGISTERED(900984, "Scope already exists", 409, "Scope %s already exists"),
SHARED_SCOPE_ALREADY_ATTACHED(900985, "Shared Scope already attached", 409,
"Shared Scope %s is already used by one or more APIs"),
SCOPE_VALIDATION_FAILED(900986, "Scope validation failed", 412, "Scope validation failed"),
SHARED_SCOPE_DISPLAY_NAME_NOT_SPECIFIED(900987, "Shared Scope display name not specified", 400,
"Shared Scope display name not specified"),

//Dedicated container based gateway related Codes
NO_RESOURCE_LOADED_FROM_DEFINITION(900990, "Container based resource Not Found", 404, "No resource loaded from " +
Expand Down
Loading