-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rest.security.provider): Added REST Api for Security Service (#4843
) * Added org.eclipse.kura.rest.security.provider * Added tests * Added new bundle to distribution * added required bundle for testing. * updated test. * Fixed test http methods * Fixed REST_APP_ID. * Set SecurityService to optional * Added thenResponseBodyIsEmpty * added enabled true expected json message * Fixed SecurityService name * Added immediate * Fixed SecurityRestService fqn * fixed test. * fixed EXPECTED_DEBUG_ENABLE_TRUE_RESPONSE * added reset mock to givenSecurityService * fixed json string * removed unnecessary resources folder * removed unnecessary package import
- Loading branch information
1 parent
c101efc
commit 25ca1a2
Showing
18 changed files
with
1,100 additions
and
2 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
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
24 changes: 24 additions & 0 deletions
24
kura/org.eclipse.kura.rest.security.provider/META-INF/MANIFEST.MF
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,24 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: Security REST Service | ||
Bundle-SymbolicName: org.eclipse.kura.rest.security.provider;singleton:=true | ||
Bundle-Version: 1.0.0.qualifier | ||
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))" | ||
Bundle-ClassPath: . | ||
Bundle-ActivationPolicy: lazy | ||
Service-Component: OSGI-INF/*.xml | ||
Import-Package: javax.annotation.security;version="1.2.0", | ||
javax.ws.rs;version="2.0.1", | ||
javax.ws.rs.core;version="2.0.1", | ||
org.apache.commons.io;version="2.4.0", | ||
org.eclipse.kura;version="[1.3,2.0)", | ||
org.eclipse.kura.cloudconnection.request;version="[1.0,2.0)", | ||
org.eclipse.kura.request.handler.jaxrs;version="[1.0,2.0)", | ||
org.eclipse.kura.request.handler.jaxrs.annotation;version="[1.0,2.0)", | ||
org.eclipse.kura.rest.configuration.api;version="[1.0,2.0)", | ||
org.eclipse.kura.security;version="[1.1,2.0)", | ||
org.osgi.framework;version="1.8.0", | ||
org.osgi.service.cm;version="1.6.0", | ||
org.osgi.service.component;version="[1.3,2.0)", | ||
org.osgi.service.useradmin;version="1.1.0";resolution:=optional, | ||
org.slf4j;version="1.7.25" |
48 changes: 48 additions & 0 deletions
48
kura/org.eclipse.kura.rest.security.provider/OSGI-INF/SecurityRestService.xml
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,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2023 Eurotech and/or its affiliates and others | ||
This program and the accompanying materials are made | ||
available under the terms of the Eclipse Public License 2.0 | ||
which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
Eurotech | ||
--> | ||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.eclipse.kura.internal.rest.security.provider.SecurityRestService"> | ||
<implementation class="org.eclipse.kura.internal.rest.security.provider.SecurityRestService"/> | ||
|
||
<property name="kura.service.pid" type="String" value="org.eclipse.kura.internal.rest.security.provider.SecurityRestService"/> | ||
|
||
<reference interface="org.eclipse.kura.cloudconnection.request.RequestHandlerRegistry" | ||
bind="bindRequestHandlerRegistry" | ||
unbind="unbindRequestHandlerRegistry" | ||
cardinality="0..n" | ||
name="RequestHandlerRegistry" | ||
policy="dynamic"/> | ||
|
||
<reference interface="org.eclipse.kura.security.SecurityService" | ||
bind="bindSecurityService" | ||
cardinality="0..1" | ||
name="SecurityService" | ||
policy="static"/> | ||
|
||
<reference interface="org.osgi.service.useradmin.UserAdmin" | ||
bind="bindUserAdmin" | ||
cardinality="0..1" | ||
name="UserAdmin" | ||
policy="static"/> | ||
|
||
<service> | ||
<provide interface="org.eclipse.kura.internal.rest.security.provider.SecurityRestService"/> | ||
</service> | ||
|
||
<property name="service.pid" | ||
type="String" | ||
value="org.eclipse.kura.internal.rest.security.provider.SecurityRestService"/> | ||
|
||
</scr:component> |
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,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | ||
<title>About</title> | ||
</head> | ||
<body lang="EN-US"> | ||
<h2>About This Content</h2> | ||
|
||
<p>November 30, 2017</p> | ||
<h3>License</h3> | ||
|
||
<p> | ||
The Eclipse Foundation makes available all content in this plug-in | ||
("Content"). Unless otherwise indicated below, the Content | ||
is provided to you under the terms and conditions of the Eclipse | ||
Public License Version 2.0 ("EPL"). A copy of the EPL is | ||
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. | ||
For purposes of the EPL, "Program" will mean the Content. | ||
</p> | ||
|
||
<p> | ||
If you did not receive this Content directly from the Eclipse | ||
Foundation, the Content is being redistributed by another party | ||
("Redistributor") and different terms and conditions may | ||
apply to your use of any object code in the Content. Check the | ||
Redistributor's license that was provided with the Content. If no such | ||
license exists, contact the Redistributor. Unless otherwise indicated | ||
below, the terms and conditions of the EPL still apply to any source | ||
code in the Content and such source code may be obtained at <a | ||
href="http://www.eclipse.org/">http://www.eclipse.org</a>. | ||
</p> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.