Skip to content

Commit

Permalink
Ready for open pull request
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Jan 27, 2023
1 parent 601886e commit 16bf848
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add query for initialized extensions ([#5658](https://github.com/opensearch-project/OpenSearch/pull/5658))
- Revert 'Added jackson dependency to server' and change extension reading ([#5768](https://github.com/opensearch-project/OpenSearch/pull/5768))
- Add support to disallow search request with preference parameter with strict weighted shard routing([#5874](https://github.com/opensearch-project/OpenSearch/pull/5874))
- Add identity and access control extension point ([5925](https://github.com/opensearch-project/OpenSearch/pull/5925))

### Dependencies
- Bumps `log4j-core` from 2.18.0 to 2.19.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.Collection;

/**
* Abstract Rest Test Case for IdentityPlugin that installs and enables IdentityPlugin and removes mock
* Abstract Rest Test Case installs and enables ShiroIdentityPlugin and removes mock
* http transport to enable REST requests against a test cluster
*
* @opensearch.experimental
Expand Down Expand Up @@ -88,35 +88,4 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
protected boolean ignoreExternalCluster() {
return true;
}

protected void startNodes() throws Exception {
// final String clusterManagerNode = internalCluster().startClusterManagerOnlyNode();

// ClusterStateResponse clusterStateResponse = client(clusterManagerNode).admin()
// .cluster()
// .prepareState()
// .setClusterManagerNodeTimeout("1s")
// .clear()
// .setNodes(true)
// .get();
// assertNotNull(clusterStateResponse.getState().nodes().getClusterManagerNodeId());

// // start another node
// final String dataNode = internalCluster().startDataOnlyNode();
// clusterStateResponse = client(dataNode).admin()
// .cluster()
// .prepareState()
// .setClusterManagerNodeTimeout("1s")
// .clear()
// .setNodes(true)
// .setLocal(true)
// .get();
// assertNotNull(clusterStateResponse.getState().nodes().getClusterManagerNodeId());
// // wait for the cluster to form
// assertNoTimeout(client().admin().cluster().prepareHealth().setWaitForNodes(Integer.toString(2)).get());
// List<NodeInfo> nodeInfos = client().admin().cluster().prepareNodesInfo().get().getNodes();
// assertEquals(2, nodeInfos.size());

// Thread.sleep(1000);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public String toString() {
*/
public void login(AuthToken authenticationToken) {
org.apache.shiro.authc.AuthenticationToken authToken = AuthTokenHandler.translateAuthToken(authenticationToken);

shiroSubject.login(authToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public BasicAuthToken(final String headerValue) {

final String[] tokenParts = usernamepassword.split(":", 2);
if (tokenParts.length != 2) {
// TODO: Wrong except type
throw new IllegalStateException("Illegally formed basic authorization header " + tokenParts[0]);
}
user = tokenParts[0];
Expand All @@ -39,7 +38,6 @@ public String getUser() {
return user;
}

// TODO: Password should not be actually stored this way, but lets handle this in a future PR
public String getPassword() {
return password;
}
Expand Down

0 comments on commit 16bf848

Please sign in to comment.