-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from shreelakshmijoshi/add-adapter-configs
Update RS Proxy
- Loading branch information
Showing
20 changed files
with
507 additions
and
735 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
13 changes: 13 additions & 0 deletions
13
examples/consumers(adapter)/example-secrets/secrets/config.ini
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,13 @@ | ||
[server_setup] | ||
username = <rs-proxy-adapter-user> | ||
password = <rs-proxy-adapter-user passwd> | ||
host = <databroker-host> | ||
port = 24567 | ||
vhost = IUDX-INTERNAL | ||
|
||
|
||
[collection_queue] | ||
queue = <queue-name> | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
configparser==5.3.0 | ||
pika==1.3.1 | ||
requests==2.28.2 | ||
PyNaCl==1.5.0 | ||
urllib3==1.26.14 | ||
configparser==5.3.0 |
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 @@ | ||
{"id":["iisc.ac.in/89a36273d77dac4cf38114fca1bbe64392547f86/rs.iudx.io/surat-itms-realtime-information/surat-itms-live-eta"],"geo-query":{"lat":21.178,"lon":72.834,"radius":10.0,"geoproperty":"location"},"offset":"0","limit":"10","searchType":"latestSearch_geoSearch","instanceID":"localhost:8090","applicableFilters":["SPATIAL","TEMPORAL","ATTR"],"publicKey":"1uxmO5GqpqootKRxK_6f_HvJ7ownd_ejwd_kZBN-bzM="} |
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
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
48 changes: 48 additions & 0 deletions
48
src/main/java/iudx/rs/proxy/authenticator/authorization/DelegateAuthStrategy.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,48 @@ | ||
package iudx.rs.proxy.authenticator.authorization; | ||
|
||
import iudx.rs.proxy.authenticator.model.JwtData; | ||
import iudx.rs.proxy.common.Api; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class DelegateAuthStrategy implements AuthorizationStrategy { | ||
|
||
private static final Logger LOGGER = LogManager.getLogger(DelegateAuthStrategy.class); | ||
|
||
static Map<String, List<AuthorizationRequest>> providerAuthorizationRules = new HashMap<>(); | ||
private final Api apis; | ||
private static volatile DelegateAuthStrategy instance; | ||
|
||
private DelegateAuthStrategy(Api apis) { | ||
this.apis=apis; | ||
buildPermissions(apis); | ||
} | ||
|
||
public static DelegateAuthStrategy getInstance(Api api) | ||
{ | ||
if (instance == null) | ||
{ | ||
synchronized (DelegateAuthStrategy.class) | ||
{ | ||
if (instance == null) | ||
{ | ||
instance = new DelegateAuthStrategy(api); | ||
} | ||
} | ||
} | ||
return instance; | ||
} | ||
private void buildPermissions(Api api) { | ||
// delegate allowed to access all endpoints | ||
|
||
} | ||
|
||
@Override | ||
public boolean isAuthorized(AuthorizationRequest authRequest, JwtData jwtData) { | ||
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
45 changes: 0 additions & 45 deletions
45
src/main/java/iudx/rs/proxy/database/example/elasticsearch/ElasticsearchServiceImpl.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.