forked from opensearch-project/security
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opensearch-project#2595 adding dummy validator to reach class
Signed-off-by: scosta <[email protected]>
- Loading branch information
1 parent
d507dfc
commit d53251e
Showing
4 changed files
with
110 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...ain/java/org/opensearch/security/dlic/rest/validation/ExtensionRegistrationValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
package org.opensearch.security.dlic.rest.validation; | ||
|
||
import org.opensearch.common.bytes.BytesReference; | ||
import org.opensearch.common.settings.Settings; | ||
import org.opensearch.rest.RestRequest; | ||
|
||
/** | ||
* Validator for Internal Users Api Action. | ||
*/ | ||
public class ExtensionRegistrationValidator extends AbstractConfigurationValidator { | ||
|
||
public ExtensionRegistrationValidator(final RestRequest request, boolean isSuperAdmin, BytesReference ref, final Settings opensearchSettings, | ||
Object... param) { | ||
super(request, ref, opensearchSettings, param); | ||
allowedKeys.put("unique_id", DataType.STRING); | ||
allowedKeys.put("description", DataType.STRING); | ||
allowedKeys.put("indices", DataType.ARRAY); | ||
allowedKeys.put("protected_indices", DataType.ARRAY); | ||
allowedKeys.put("endpoints", DataType.ARRAY); | ||
allowedKeys.put("protected_endpoints", DataType.ARRAY); | ||
} | ||
|
||
@Override | ||
public boolean validate() { | ||
//TODO | ||
return true; | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters