AWS JAVA SDK V2 - how to work with metadata service - amazon-web-services

till now i am working with V1 of the SDK, how ever I need to support IMDSV2. although in the V1 code I see it support it, actually it isnt, as I still getting 401 and it seems that I need to query the token and pass it to the metadata utils. I wanted to see if in V2 it was fixed, but i dont see in their doc, how to interact with the metadata service

spring cloud 1.12 resolved the issue for me. This version supports IMDSv2 and not the older ones.

Related

WSO2 APIM: Configuration variables

(I know that this sounds as a newbie questions, but, you know, really, I don't finde the answer in docs)
In WSO2 products, and specifically in API Manager (2.1.0), we have to modify a lot of configuration files just to start.
We have seen that some configuration files (api-manager.xml, carbon.xml) use configurations variables. E.g., ${admin.username} to substitute by admin user.
We have found an old post (2016) explaining the use of configuration variables in WSO2 products
https://medium.com/#shan1024/overriding-configurations-in-wso2-products-using-deployment-properties-file-f096e96f782d
But we are not able to find the deployment.properties files referenced in that post, neither and official documentation.
Do you know if this works in APIM? Where have I to install this file?
As far as I know, deployment.yaml was introduced in Carbon kernel 5.2 onwards. But WSO2 APIM 2.x is based on Carbon kernel 4.4.X. Therefore APIM 2.x doesn't support that.
WSO2 APIM 3.X will support this feature.

Detecting PCF version(s)

I have access to our corporate PCF, though both the Apps Manager webpage and the "cf" CLI (and thus the API).
How can I detect what version of PCF they're running? There's nothing in the website that lists it, and the best I can find is using cf api which returns:
api version: 2.98.0
How can I map that to the PCF version, or is there another way to detect it?
Usually via Ops Manager however another quick way is to click on the 'Docs' in Apps Manager it should take you to the documentation of relevant PCF version. For ex: https://docs.pivotal.io/pivotalcf/2-6/pas/intro.html means PCF 2.6
Please be advised that documentation link requires to be updated during upgrades so if someone doesn't do - it will be pointing out to older version..
I don't believe Apps Manager or the API (i.e. Cloud Controller) will report that information. Both are just single parts of the entire system, so I think you could really only expect them to publish their own version information.
If you want to see versions of what is installed, you need to look at Ops Manager. That will show you the tiles that are installed and each version.
If you don't have access to Ops Manager, you'd need to ask your platform operators.
Hope that helps!

Configuring WSO2 Identity Server as Key Manager with API Manager

I'm looking for some guidance about two specific WSO2 products, API Manager and Identity Server and for the best solution to solve the problem I'm going to explain below.
In my company, we are using ADFS 3.0 for Single Sign On support in our applications. However we are now building applications that will require OpenID Connect Specification (SPA's+Rest API's) and ADFS does not support this out of the box so we've decided to use WSO2 products for that purpose.
I already managed to install WSO2 Identity Server 5.0.0 SP1 and configured ADFS as a federated Identity Provider (the new applications will still have to authenticate users using ADFS). I also installed WSO2 API Manager 1.9.1 and configured it to use WSO2 Identity Server as the Key Manager (Configuration tutorial).
Now the problem:
Using WSO2 Identity Server 5.0.0 SP1 I couldn't get the Logout feature to work due to the issue reported here. It seems that this issue has been solved in version 5.1.0M4 so I tried to install version 5.1.0-alpha and managed to make the logout to work with ADFS (I tested it by enabling SSO for the carbon administration). However, now I'm not able to install the Key Manager feature through the carbon repositories due to incompatibilities.
As a result, with the first combination (wso2is 5.0.0 SP1/wso2am 1.9.1) I had the logout issue with ADFS and with the second combination (wso2is 5.1.0-alpha/wso2am 1.9.1), I'm not able to install the Key Manager feature in Identity Server.
Is there any way to apply a patch to solve the logout issue in the first combination? Is there a way to install the key manager feature on WSO2IS 5.1.0-alpha? Or can someone point me to another solution to solve this issue?
The issue you pointed above, marked as it type as "Patch". Usually that means WSO2 have fixed this issue for a earlier version and provided a patch to its customer. Easiest thing would be, if you are already a customer of WSO2 ask for the patch directly from their support.
If you are not a paid customer of WSO2 you are in bit of a trouble. As per this question, the source of the Service Pack also not available in public.
But luckily in your case, the component which need to have this fix not a core component. So you wouldn't be in trouble if you change the authenticator code bit. But the warning is, it would lose any fixes done for org.wso2.carbon.identity.application.authenticator.samlsso_4.2.1.jar in the service pack.
Anyway, these are the steps you should follow.
Checkout the source. Lazy path would be checkout the whole source from here. That is the most easy way which you will face less troubles when you try to build the source but the downside of that is, it would take bit of time to checkout. If you know how to build specific component from WSO2 source, you can directly checkout component it needed to changed.
Try to build the component without doing any change just to make sure there are not any issues upto this point.
Goto the class DefaultSAML2SSOManager and do the same change done in the PR.
Build the component again.
Create folder named like "patch9000" inside the <IS_HOME>/repository/components/patches/ folder.
Copy build jar (org.wso2.carbon.identity.application.authenticator.samlsso-4.2.1.jar ) in step 4 from the target folder to the <IS_HOME>/repository/components/patches/patch9000 folder.
Restart the server. If you have done everything to the point, in the server startup it would print a log like, org.wso2.carbon.server.extensions.PatchInstaller - Patch changes detected
Now retry the your flow and it would work as expected.
If you too lazy to do all above, you can wait until Identity Server Service Pack 2, which will have your fix.

Migration path for Fql.multiquery

I'm new to Facebook development. I'm working on migrating an existing app in accordance to the Graph API upgrade guide. I'm looking for guidance around calls such as api.facebook.com/method/Fql.multiquery.
My question is: does this type of API need to be upgraded as well, or does it only apply to graph.facebook.com calls? I want to ensure that api.facebook.com/method/Fql.multiquery calls will still work after 4/30/15.
You may want to take a look at the Batch Requests of the Graph API. You can also specify dependencies between the requests.
Calls to http://api.facebook.com/method/Fql.multiquery will no longer work. The REST API is long deprecated anyway.
As #luschn said, you have to migrate to the Graph APIs batch requests, and use the /fql endpoint. You can only use FQL if you have a v2.0 app, and not higher.

WSO2 API Manager: PUT and OPTIONS invocations fail at the Gateway

We are trying to implement CORS support in our APIs, and it we are getting an error from API Manager that is exactly the same as what is described here.
We are using API Manager 1.3.
Can someone confirm that there is no way to support OPTIONS with API Manager 1.3? We don't want to upgrade to 1.4 at this time.
There was another issue which we found when using PUT and OPTIONS method from APIs as described in [1].
This was fixed with AM 1.4.0.Hence better option is to upgrade to 1.4.0 as it contains fix for both your mentioned issue and mine mentioned one.And additionally AM 1.4.0 contains several new features with it.
[1] https://issues.apache.org/jira/browse/SYNAPSE-919
Thanks;