How to retrieve all ACLs in loopback js? - loopbackjs

In my ACLs there are some rules(acl) defined for the particular user.
From explorer or angular frontend how to get all acls of a particular user?
I have tried from explorer :
URL : http://localhost:3000/api/ACLs?filter=
{"where":{"principalId":"5a817425e09bdb38f9217c20"}} // []
Something I am missing or other alternative is there.
Someone help me.
Thanks

From my API explorer (Loopback 3) the endpoint should be:
http://localhost:3000/api/a-c-ls?filter=%7B%22where%22%3A%7B%22principalId%22%3A%221%22%7D%7D
Also, as for icecream_hobbit comment, I believe you're querying the wrong value of principalId.

Related

Google Cloud Platform Restrictions Http referrers doesn't work as expected

If I set the Api Key restrictions to "None", the service works great. If I set the Http referrers to websites, it works as expected with certain websites. If I set the Http referrers to the Urls of Web API Servers, I get a "restricted" message. Does anyone know how to allow the Url of the Web API Server to make a successful call when restrictions are being used? I would think that api.somedomain.com would work.
Looks like it might not be possible. Wow, what a shame! Hopefully, there is an update or workaround for this.
How to set Google API key restriction - HTTP referrers
By the way, this doesn't work either. This is an example in their documentation.
():somedomain.com/
(*): .somedomain.com/
I have to write the full sub domain to all my website Urls.
Thanks in advance!
What I ended up doing is creating another Api Key for my Web API Server requests. Since this key isn't displayed in a website, I shouldn't have to lock it down.

How to use cognito:username at http proxy integration of HttpApi of AWS?

I want to use the variable named event.requestContext.authorizer.jwt.claims.cognito:username which is the result of JWT authorizer at the URI of http proxy integration of HttpApi(I mean not RestApi) of AWS , because I want to access the information of authorized user. The exposed api is like this.
https://xxxxxx.com/platform/pro/user/john
pro means production .
john is event.requestContext.authorizer.jwt.claims.cognito:username .
The management console said my input like this is error.
https://xxxxxx.com/platform/${stageVariables.stage}/user/${event.requestContext.authorizer.jwt.claims.cognito:username}
I think : is NG.
Please help me.
I just found this question by accident. I guess you solved this in the meantime, but in case it's still relevant, you need to put cognito:username in quotes and brackets, so instead of ${event.requestContext.authorizer.jwt.claims.cognito:username} use ${event.requestContext.authorizer.jwt.claims['cognito:username']}.

Add Web Root Context to return calls in WSO2 IS 5.7.0

I need to add a WebRootContext to all the calls in the WSO2 Identity Server's Implicit Flow so that I can make calls through an API Gateway. I have managed to do this for all the calls I need by changing the
<WebContextRoot>/wso2-is<WebContextRoot>
property as well as changing the name of my webapp folders: wso2-is#authenticationendpoint and wso2-is#oauth2 endpoints. I can now successfully call http://localhost:9443/wso2-is/oauth2/authorize.
I also changed the endpoints in repository/conf/identity/identity.xml to include the wso2-is root context, specifically the OAuth2AuthzEPUrl, so that in the management console this shows up under identity:
However, after I login, the application calls http://localhost:9443/wso2-is/commonauth which has a return location of http://localhost:9443/oauth2/authorize?sessionDataKey=... and I can't figure out how to add my context root to the returning call. Where does the commonauth endpoint get the location it returns to? I'm assuming there is some property I need to set to make that happen, but I can't find it.
I also tried re-seeding the database with all my changes and this did not solve my issue either.
I looked in the source code here in github and couldn't find any references to commonauth or oauth2/authorize that stood out as to where this call is being formed. Any additional details would be greatly appreciated.
As per the official documentation, using a reverse proxy is the recommended way to add a custom context path to wso2 products.
However, as I wrote in another question, I could complete the implicit flow with local auth successfully with the mentioned configs in my answer.
I guess, what you are missing here is ProxyContextPath.

How to config the URL embedded in QR code in device manager

I am a newbie to wso2. I just manage to bring up the emm site. But when I try to add my device to the device manager, I find that the QR code generated always has URL with domain localhost. When I look into the logs, it has something like this:
./repository/logs/wso2carbon.log:TID: [-1234] [] [2016-08-22 15:54:05,887] INFO {org.jaggeryjs.jaggery.app.mgt.TomcatJaggeryWebappsDeployer} - Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/store].File[/opt/wso2emm-2.0.1/repository/deployment/server/jaggeryapps/store]
So, I think I need to config the variable StandardHost to domain I needed. But I can't find a place for that. Any idea? Thanks.
You can find the relevent config in the Following file.
<EMM_HOME>/repository/deployment/server/jaggeryapps/emm/config/config.json
Also you refer the documentation here.

Gateway WebService Flexcube

I try to use FLEXCUBE Gateway Webservice for that I use weblogic and deployed ear file of webservice. I depolyed them successfully; Hovewer, when I send request with FCUBSCreateCustomerService I got this error :
ECODE>GW-ROUT0003
No data found for the service, operation and source combination
and this is my xml file that I send request
Is there any one have any idea about this error ?
In Flexcube Webservice, deployment is not enough. You also need to do all the configuration to allow this web service to expose Flexcube functionalities to the outer world.
There are some pending maintenance's that you need to do on Flexcube, most times its centered around the service(FCUBSCustomerService) and operation(CreateCustomer) and the Userid
Check the userid FCATOP is valid user id for FCUBS. I have also faced GW-ROUT0003 for invalid user id.
Function and Action needs to be mapped for each webservice. Screen ID in flexcube -> GWDEXFUN
You need to following maintenance:- /n /br
1. Do source->module maintenance on function ID: CODUPLDM /n /br
1. Do Source->FunctionID->Service/method maintenance on function ID: GWDEXFUN /n /br
You need to maintain the service,operation and source combination in function_id GWDETFUN to overcome the issue GW-ROUT0003.For more information you can check the Gateway Services Documentation