AWS Command Line Tools need recoding for secure login? - amazon-web-services

The AWS command line tools appear to be broken on both Linux (Ubuntu PP) and Windows (7). In both cases, after setting up the login credentials correctly and trying to run the most basic tool (getBalance.sh), I get a failure to authenticate.
An error occurred while fetching your balance: This request must be made over a secure channel. You must use 'https' rather than 'http'.
Seems simple enough, but there's nothing in the manual nor in the installed directory which would suggest that this is an option supported by the command line tools.
Has someone already modified the shell scripts to use a secured connection? If not, any clues as to where I should begin the modifications?

I haven't used the tools extensively so can't say this solution is extensively tested but getBalance.sh worked after doing this
See this thread:
https://forums.aws.amazon.com/message.jspa?messageID=333485
From the link:
Edit the Command Line Tools Installation Directory\bin\mturk.properties file and edit the service_url to use https instead of http – i.e. https://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester for production, and https://mechanicalturk.sandbox.amazonaws.com/?Service=AWSMechanicalTurkRequester for sandbox.

Related

PermissionError using testrunner of soapui through RobotFramework

I'm currently working on web services test automation, to do it, I'm calling SoapUI testrunner.bat from robotframework to send a request using run process keyword. The command used:
run process "AbsolutePath/testrunner.bat" -e"enpointURL" -t"aboslutePath/soap-projectSettings.xml" -s"testsuitename" -c"testcasename" -r"aboslutePath/soap-project.xml"
The command, used in a cmd without admin permissions is working fine and making the request. If it's used from robot returns a PermissionError: [WinError 5] Acces is denied.
I've already checked the permissions of the SoapUI root folder (where testrunner.bat is) and the SoapUI project. All of them are "Full control" for my user.
Also, I've checked if there is any way to run process with admin permissions but nothing.
I'm not understanding something or missing something and I'm stucked.
Thanks in advance, best regards!
okay, my fault.
I should use a tab instead a simple space
run process "AbsolutePath/testrunner.bat" -e"enpointURL" -t"aboslutePath/soap-projectSettings.xml" -s"testsuitename" -c"testcasename" -r"aboslutePath/soap-project.xml"
each argument of the command is also an argument in robot. I thought that all the command was an argument.

Enabling logging for OpenLDAP client?

I'm trying to do some authentication inside a Django application using django-auth-ldap via the OpenLDAP client. It's not working so how do I enable some logging?
I CAN make LDAP queries using ldapsearch so fundamentally my config is correct and I tried enabling logging for django-auth-ldap but it just reports an Error(0) which is completely unhelpful.
So how do I enable logging for the OpenLDAP client part of the equation? Ideally I would like to see what queries it is making and using which config is being passed down from django-auth-ldap. I did find ldap.conf but the syntax man page implies there is no logging or debug option.
Stumbled across the answer...
To enable logging via the Django LDAP library, add the following to the settings.py file for your project
AUTH_LDAP_GLOBAL_OPTIONS = {
ldap.OPT_DEBUG_LEVEL: 255
}
The error that this flushed out was that I was using docker-compose and setting some environment values such as LDAP_SERVER="ldap://an.ldap.server.com" - but I should not have been quoting the string as the double-quotes were made part of the value. Removing these got me moving again.

WSO2 ESB: Getting Dead Pages When Running in Windows Service

I'm getting blank pages when navigating the WSO2 ESB-4.9.0 management console. For example, the registry, templates, endpoints, and local entries pages are all blank when navigating to them in the console UI.
I've found the following errors in the logs:
Error during rendering
IO Error executing tag: JSPException while including path '/templates/list_templates.jsp'. ServletException while including page.
The ESB is running in a YAJSW Windows Service. I should note that the ESB runs fine when running straight from the command line, it's just when using the service wrapper.
Strainy
Since you mentioned that the ESB starts as a window service, in carbon 4.4.x, default wrapper.conf file needs to be updated with following additional entries.
wrapper.java.additional.26 = -Dwso2.carbon.xml=${carbon_home}\\repository\\conf\\carbon.xml
wrapper.java.additional.27 = -Dwso2.registry.xml=${carbon_home}\\repository\\conf\\registry.xml
wrapper.java.additional.28 = -Dwso2.user.mgt.xml=${carbon_home}\\repository\\conf\\user-mgt.xml
wrapper.java.additional.29 = -Dwso2.transports.xml=${carbon_home}\\repository\\conf\\mgt-transports.xml
wrapper.java.additional.31 = -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
wrapper.java.additional.33 = -Dfile.encoding=UTF8
You can verify these configurations in wrapper.conf and these configurations may help you to solve the jsp error.
Following link may help you if you need more information regarding this.
https://docs.wso2.com/display/ESB490/Installing+as+a+Windows+Service#InstallingasaWindowsService-SettinguptheYAJSWwrapperconfigurationfile
I just used the NSSM - the "Non-Sucking Service Manager".
It's actually amazingly simple to install a Service using this tool.
https://nssm.cc
Just set it up to point at the wso2server.bat file
Keeping an eye on this issue however: https://wso2.org/jira/browse/ESBJAVA-4342

Create Amazon Cloudfront distribution in a script (Windows)

Is there anywhere a decent full example of creating a distribution (ideally with more than one origin - S3 and an AMS) from the command line? I was a bit dismayed to find that it isn't a case of "aws cloudfront blah blah..."
In Windows, assuming no special tools - though any solution that needs a standalone exe is fine. I have been hinted to use cURL... but can't figure out all the stuff I need to pass in, or indeed how to use cURL to do so - have found it has a -h param for headers...but never used cURL so a bit lost.
Looked http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html but am bemused by the sketchiness of the 'example' e.g.
POST /2013-09-27/distribution HTTP/1.1
Host: cloudfront.amazonaws.com
Authorization: AWS authentication string
Date: Thu, 17 May 2012 19:37:58 GMT
Other required headers
...
Where do I find my AWS authentication string?
What are the "Other required headers"
Distribution ID I can find on the Cloudfront admin page on the web
I am totally lost - need the real beginners guide here, step by step, ideally cross referenced to the Cloudfront admin page on the web. I'm a C#/SQL desktop apps dev normally, so this is way out of comfort zone.
Have ended up using the Amazon SDK for .NET
Actually, it probably is a matter of aws cloudfront blah blah
When typing aws cloudfront in a recent version of the AWS CLI one gets:
This service is only available as a preview service.
However, if you'd like to use a basic set of cloudfront commands with the
AWS CLI, you can enable this service by adding the following to your CLI
config file:
[preview]
cloudfront=true
Following this advice, you get the command aws cloudfront create-distribution.
I am personally still struggling to find the correct input for required params like --distribution-config
Running aws configure set preview.cloudfront true did not work for me. In my case (Linux), the following worked:
Edit the file ~/.aws/config and add the content
[preview]
cloudfront=true
To its end. This topic helped, but not mentioned the [brackets].

Can I change the password for vmc tunnel?

It's too long for MongoExplorer. For some reason MongoExplorer set the maximum password length to 20. The one generated by mvc tunnel doesn't work.
I'm afraid you can't as this is actually the credentials generated for your service (not only for the tunnel feature). Maybe you can pass the password to MongoExplorer in another way (maybe command line argument?)
I'm afraid the password is generated so you cannot change it. I would raise a defect/bug against MongoExplorer (I just checked, and the site says that development is currently suspended). FWIW on the Mac I use MongoHub as a GUI, and that works fine with a vmc tunnel.