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

OKTA-302317: Release Java Mgmt SDK v2.0.0 #422

Merged
merged 53 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
e499ddb
upgrade to openapi v2.0.0 (#380)
arvindkrishnakumar-okta May 27, 2020
34f1dce
openapi spec update - remove 200 response from generateCsrForApplication
arvindkrishnakumar-okta May 29, 2020
9e627a9
Update OktaOrgCleaner.groovy
arvindkrishnakumar-okta May 29, 2020
b9ba85c
Fix flaky GroupsIT#groupUserOperationsTest test
arvindkrishnakumar-okta May 29, 2020
9fd5da3
Update GroupsIT.groovy
arvindkrishnakumar-okta May 29, 2020
336436a
OKTA-279039: Fix flaky ApplicationsIT associateUserWithApplication test
arvindkrishnakumar-okta May 29, 2020
6bd0a62
Update GroupsIT.groovy
arvindkrishnakumar-okta May 29, 2020
1132551
Addressed review comment
arvindkrishnakumar-okta May 29, 2020
7566abd
Merge pull request #387 from okta/fix_flaky_applicationsIT_associateU…
ivanezeigbo-okta May 31, 2020
dae26a8
Merge pull request #386 from okta/fix_flaky_groupsIT_groupUserOperati…
ivanezeigbo-okta May 31, 2020
3b7182a
OKTA-289656: Add Applications API Integration Tests
arvindkrishnakumar-okta Jun 1, 2020
c676de0
OKTA-289655: Add Admin role API Integration Tests
arvindkrishnakumar-okta Jun 2, 2020
922ac2a
Open API Csr rename update (#394)
arvindkrishnakumar-okta Jun 5, 2020
1e1c6f5
Merge pull request #396
arvindkrishnakumar-okta Jun 5, 2020
7bf67f4
revert csr model rename (#398)
arvindkrishnakumar-okta Jun 5, 2020
e6c0ab8
open api spec update (#401)
arvindkrishnakumar-okta Jun 9, 2020
bd64a2e
Open API spec - fix binding enum value for ProtocolEndpoint model (#406)
arvindkrishnakumar-okta Jun 10, 2020
835e258
OKTA-289662: Add SMS Templates API Integration Tests (#395)
arvindkrishnakumar-okta Jun 10, 2020
dc89697
OKTA-289665: Add Linked Objects Integration Tests (#404)
arvindkrishnakumar-okta Jun 11, 2020
6edb6f2
Updated Licence Header in LinkedObjectsIT (#410)
arvindkrishnakumar-okta Jun 15, 2020
033bc37
OKTA-289668: Add User Type Integration Tests (#405)
arvindkrishnakumar-okta Jun 15, 2020
a8a4ada
Open API Update - Sync with #238 #239 (#411)
arvindkrishnakumar-okta Jun 15, 2020
366b730
sync with open api pr #240 (#413)
arvindkrishnakumar-okta Jun 15, 2020
d5d755d
Open API Update - Sync with #241 (#412)
arvindkrishnakumar-okta Jun 15, 2020
fdb31f8
Open API Update - Sync with #242 (#414)
arvindkrishnakumar-okta Jun 15, 2020
8fbb76f
Open API Update - Sync with Open API PR 243 (#416)
arvindkrishnakumar-okta Jun 16, 2020
b6f0ec9
OKTA-289657: Add Factors API Integration Tests (#391)
arvindkrishnakumar-okta Jun 17, 2020
99e9de1
OKTA-289659: Add Event Hooks Integration Tests (#399)
arvindkrishnakumar-okta Jun 17, 2020
0d99991
OKTA-289659: Add Authorization Server Integration Tests (#402)
arvindkrishnakumar-okta Jun 17, 2020
c75a542
OKTA-289660: Add Inline Hooks Integration Tests (#400)
arvindkrishnakumar-okta Jun 18, 2020
e02a97a
Open API Update - Sync with Open API PR 244 (#418)
arvindkrishnakumar-okta Jun 19, 2020
534b922
fixed copy paste error
arvindkrishnakumar-okta Jun 19, 2020
d72aa59
OKTA-289661: Add Feature API Integration Tests (#397)
arvindkrishnakumar-okta Jun 24, 2020
d59723e
Open API Update - Sync with Open API PR 249 (#420)
arvindkrishnakumar-okta Jun 29, 2020
8175213
OKTA-289663: Add IdP Integration Tests (#409)
arvindkrishnakumar-okta Jun 29, 2020
fca6493
Merge https://github.com/okta/okta-sdk-java into dev_openapi_v2.0.0_m…
arvindkrishnakumar-okta Jun 30, 2020
afac0bb
Merge branch 'master' of https://github.com/okta/okta-sdk-java into d…
arvindkrishnakumar-okta Jun 30, 2020
61d16cd
resolved merge conflicts with master changes
arvindkrishnakumar-okta Jul 1, 2020
bf7b77c
removed Default prefix from few Idp builders
arvindkrishnakumar-okta Jul 1, 2020
640c93e
added swagger code gen check for backward compatibility requirements …
arvindkrishnakumar-okta Jul 1, 2020
623aa7e
fixed findbugs error
arvindkrishnakumar-okta Jul 1, 2020
d190cd7
updates per swagger regen code and one other update to Idp builder
arvindkrishnakumar-okta Jul 1, 2020
4f26e1d
fixed expiresAt param type in spec
arvindkrishnakumar-okta Jul 2, 2020
d84372b
deprecated old classes
arvindkrishnakumar-okta Jul 2, 2020
cb21479
refactored InlineHooksIT - deactivate created hooks so it can be clea…
arvindkrishnakumar-okta Jul 4, 2020
ba99c1d
Remove deprecated code (#426)
bdemers Jul 7, 2020
c103f6d
fixed PMD violation - unused inports
arvindkrishnakumar-okta Jul 7, 2020
9d5a387
Update integration-tests/src/test/groovy/com/okta/sdk/tests/it/CrudTe…
arvindkrishnakumar-okta Jul 7, 2020
f9b8f81
Update integration-tests/src/test/groovy/com/okta/sdk/tests/it/Factor…
arvindkrishnakumar-okta Jul 7, 2020
bb41c7d
Update integration-tests/src/test/groovy/com/okta/sdk/tests/it/UsersI…
arvindkrishnakumar-okta Jul 7, 2020
46c1ba1
Update integration-tests/src/test/groovy/com/okta/sdk/tests/it/Groups…
arvindkrishnakumar-okta Jul 7, 2020
3bc371d
minor improvements (#427)
arvindkrishnakumar-okta Jul 7, 2020
4a39c4b
OKTA-308935: Create Migration Guide for Java Mgmt SDK v2.0.0 (#423)
arvindkrishnakumar-okta Jul 7, 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
143 changes: 143 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Okta Java Management SDK Migration Guide

This SDK uses semantic versioning and follows Okta's [library version policy](https://developer.okta.com/code/library-versions/). In short, we do not make breaking changes unless the major version changes!

## Migrating from 1.x.x to 2.0.0

Version 2.0.0 of this SDK introduces a number of breaking changes from previous versions.
In addition to many new classes/interfaces, some existing classes/interfaces are no longer backward compatible due to method renaming and signature changes.

#### All `*Factor` classes Renamed to `*UserFactor`
This means that you will now have to start using the new `*UserFactor` objects instead.

### Package `com.okta.sdk.client.Client`

Below methods have been renamed for the sake of clarity.
- Renamed `createRule` to `createGroupRule`
- Renamed `getRule` to `getGroupRule`
- Renamed `listRules` to `listGroupRules`

### Package `com.okta.sdk.resource.log.LogEventList`

The API used to get log info has undergone a signature change (note the order swap of `until` and `since` parameters).
- `getLogs(String until, String since, String filter, String q, String sortOrder)`
Signature changed to `getLogs(Date since, Date until, String filter, String q, String sortOrder)`

### Package `com.okta.sdk.resource.group.GroupList`

The API used to list the groups to which a user belongs, has undergone a signature change.
There is no need for supplying the `expand` parameter anymore.
- `listGroups(String q, String filter, String expand)`
Signature changed to `listGroups(String q, String filter)`

- With this removal of `expand` parameter, the caller has two options of achieving the previous result:
- Make a second API call to the Group API and fetch the results.
- You can call the Groups API endpoint (or any Okta management API endpoint) using a syntax like below example:
```
// List Groups API, see: https://developer.okta.com/docs/reference/api/groups/#list-groups
GroupsList result = client.http()
.addQueryParameter("expand", true)
.get("/api/v1/groups", GroupsList.class);
```
- Note that the support for `expand` parameter might go away anytime in the future.

### Package `com.okta.sdk.resource.application.SwaThreeFieldApplicationSettingsApplication`

Below APIs have undergone a name change.
- `getTargetUrl` Renamed to `getTargetURL`
- `setTargetUrl` Renamed to `setTargetURL`

### Package `com.okta.sdk.resource.group.Group`

With the introduction of enum type `com.okta.sdk.resource.group.GroupType`, the get group type operation will now make
use of this new enum type instead of the `String` type used earlier.
- `getType` Return type changed from `String` to an enum `com.okta.sdk.resource.group.GroupType`

### Package `com.okta.sdk.resource.group.rule.GroupRule`

The properties `allGroupsValid` & `_embedded` were not used by the backend earlier and were always set to `null`.
As part of this upgrade, we will remove it from the method signatures.
- Removed `getAllGroupsValid` and `setAllGroupsValid` (property `allGroupsValid` is being removed;
this option would be removed from future versions of Okta API)
- Removed `getEmbedded` (property `_embedded` is removed; this property is undocumented in Okta API and hence being removed)
- `delete(Boolean removeUsers)` Signature changed to `delete()`

### Package `com.okta.sdk.resource.log.LogAuthenticationContext`

The API to get log credential provider used to return a list of objects of type `LogCredentialProvider` earlier.
This is now fixed to return a single object of type `LogCredentialProvider`.
- `getCredentialProvider` Return type changed from `List<com.okta.sdk.resource.log.LogCredentialProvider>` to `com.okta.sdk.resource.log.LogCredentialProvider`

The API to get log credential type used to return a list of objects of type `LogCredentialType` earlier.
This is now fixed to return a single object of type `LogCredentialType`.
- `getCredentialType` Return type changed from `List<com.okta.sdk.resource.log.LogCredentialType>` to `com.okta.sdk.resource.log.LogCredentialType`

### Package `com.okta.sdk.resource.policy.PolicyRule`

There is no need of exposing setter for the `read-only` property `id`.
- Removed `setId` (property `id` is `read-only`)

### Package `com.okta.sdk.resource.user.factor.VerifyFactorRequest`

The property `tokenLifetimeSeconds` will not used by the backend going forward.
- Removed `getTokenLifetimeSeconds` & `setTokenLifetimeSeconds` (property `tokenLifetimeSeconds` is removed)

### Package `com.okta.sdk.resource.user.Role`

With the introduction of enum type `com.okta.sdk.resource.role.RoleType`, the getter/setter for role type operation will now make
use of this new enum type instead of the `String` type used earlier.
- `getType` Return type changed from `String` to an enum `com.okta.sdk.resource.role.RoleType`
- `setType` Param type changed from `String` to an enum `com.okta.sdk.resource.role.RoleType`

### Package `com.okta.sdk.resource.user.User`

The below method names have been refactored to be more apt:
- Renamed `addGroupTarget` to `addGroupTargetToRole`
- Renamed `addRole` to `assignRole`
- Renamed `listGroupTargetsForRole` to `listGroupTargets`
- Renamed `removeGroupTargetFromRole` to `removeGroupTarget`
- Renamed `addFactor` to `enrollFactor`
- Renamed `listRoles`to `listAssignedRoles`

The `forgotPassword` method has been removed. Use `resetPassword` instead to achieve the same functionality.

The `endAllSessions` method has been removed. Use `clearSessions` instead to achieve the same functionality.

Following methods have undergone a return type change inline with the refactoring of `UserFactor*` objects as mentioned above.
- `listSupportedFactors` Return type changed from `com.okta.sdk.resource.user.factor.FactorList` to `com.okta.sdk.resource.user.factor.UserFactorList`
- `getFactor` Return type changed from `com.okta.sdk.resource.user.factor.Factor` to `com.okta.sdk.resource.user.factor.UserFactor`
- `listFactors` Return type changed from `com.okta.sdk.resource.user.factor.FactorList` to `com.okta.sdk.resource.user.factor.UserFactorList`

The `expirePassword` Return type changed from `com.okta.sdk.resource.user.TempPassword` to `com.okta.sdk.resource.user.User`

The reset password method will no longer need a provider argument.
- `resetPassword(String provider, Boolean sendEmail)` Signature changed to `resetPassword(Boolean sendEmail)`

### Package `com.okta.sdk.resource.user.UserCredentials`

The property `emails` was not used by the backend and was always `null` hitherto.
- Removed `getEmails` & `setEmails` (property `emails` was removed)

Below SDK classes/interfaces are **deprecated** and will be removed from this project.

These SDK classes were previously moved to [okta-commons-java](https://github.com/okta/okta-commons-java)).

```
- com.okta.sdk.authc.credentials.ClientCredentialsProvider
- com.okta.sdk.client.Proxy
- com.okta.sdk.http.HttpMethod
- com.okta.sdk.http.HttpRequest
- com.okta.sdk.http.HttpRequestBuilder
- com.okta.sdk.http.HttpRequests
- com.okta.sdk.http.UserAgentProvider
- com.okta.sdk.lang.Assert
- com.okta.sdk.lang.Classes
- com.okta.sdk.lang.Collections
- com.okta.sdk.lang.Duration
- com.okta.sdk.lang.InstantiationException
- com.okta.sdk.lang.Instants
- com.okta.sdk.lang.Locales
- com.okta.sdk.lang.Objects
- com.okta.sdk.lang.Strings
- com.okta.sdk.lang.UnknownClassException
```
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.okta.sdk</groupId>
<artifactId>okta-sdk-root</artifactId>
<version>1.6.1-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>okta-sdk-api</artifactId>
Expand Down

This file was deleted.

18 changes: 2 additions & 16 deletions api/src/main/java/com/okta/sdk/client/ClientBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package com.okta.sdk.client;

import com.okta.commons.http.config.Proxy;
import com.okta.sdk.authc.credentials.ClientCredentials;
import com.okta.sdk.cache.CacheManager;

Expand Down Expand Up @@ -294,28 +295,13 @@ public interface ClientBuilder {
* <a href="https://developer.okta.com/docs/api/getting_started/design_principles#authentication">Okta SSWS Digest
* Authentication Scheme</a> used to authenticate every request sent to the Okta API server.
*
* <p>It is not recommended that you override this setting <em>unless</em> your application is deployed in an
* environment that - outside of your application's control - manipulates request headers on outgoing HTTP requests.
* Google App Engine is one such environment, for example.</p>
*
* <pre>
* Client client = Clients.builder()...
* // setApiKey, etc...
* .setAuthenticationScheme(AuthenticationScheme.SSWS) //set the SSWS authentication scheme
* .setAuthorizationMode(AuthorizationMode.SSWS) //set the SSWS authentication mode
* .build(); //build the Client
* </pre>
*
* @param authenticationScheme the type of authentication to be used for communication with the Okta API server.
* @return the ClientBuilder instance for method chaining
*
* @deprecated since 1.6.0 use {@link #setAuthorizationMode(AuthorizationMode)} to indicate the authentication scheme.
*/
@Deprecated
ClientBuilder setAuthenticationScheme(AuthenticationScheme authenticationScheme);

/**
* Allows specifying an authorization mode.
*
* @param authorizationMode mode of authorization for requests to the Okta API server.
* @return the ClientBuilder instance for method chaining.
*
Expand Down
35 changes: 0 additions & 35 deletions api/src/main/java/com/okta/sdk/client/Proxy.java

This file was deleted.

48 changes: 0 additions & 48 deletions api/src/main/java/com/okta/sdk/http/HttpMethod.java

This file was deleted.

84 changes: 0 additions & 84 deletions api/src/main/java/com/okta/sdk/http/HttpRequest.java

This file was deleted.

Loading