fiware spagobi validation with keyrock instance - fiware

i'm using three instances in my account lab. All of them :
1.-web app and a proxy (ubuntu image)
2.-keyrock 5 (keyrock-R5.1.0 image)
3.-spagobi (spagobi image)
i having troubles setting spagobi to validate with keyrock, as in this link: authentication on spagobi using keyrock
"error while trying to get access token from Oauth2 provider"
I followed the guide here:
http://spagobi.readthedocs.org/en/latest/admin/README/index.html
the only difference is REST_BASE_URL, i change port to 5000. (default is 4730)
I think the problem is that spagobi tries to access token without X-Auth-Token value on headers. But i don't know where can i set this on spagobi.
Anyone know this problem and how to solve it? or maybe i'm wrong?
my oauth2.config.properties:
# Informations about OAuth2 application
CLIENT_ID = ea74f4f72ee3438a82f1af785af0ecf1
SECRET = 21cf7df4633d4ff2b92251c266c00d09
APPLICATION_ID = ea74f4f72ee3438a82f1af785af0ecf1
# OAuth2 urls
AUTHORIZE_URL = http://example.es:8000/oauth2/authorize
ACCESS_TOKEN_URL = http://example.es:8000/oauth2/token
USER_INFO_URL = http://example.es:8000/user
REDIRECT_URI = http://example.es:8080/SpagoBI/servlet/AdapterHTTP?PAGE=LoginPage&NEW_SESSION=TRUE
# REST API urls
REST_BASE_URL = http://example.es:5000/v3/
TOKEN_PATH = auth/tokens
ROLES_PATH = OS-ROLES/roles
ORGANIZATIONS_LIST_PATH = OS-ROLES/organizations/role_assignments
ORGANIZATION_INFO_PATH = projects/
# Admin credentials
ADMIN_ID = fiware-example-admin
ADMIN_EMAIL = fiware#example.es
ADMIN_PASSWORD = 01189998819991197253

Sorry. My fault:
because we have not ready the real domain, i add in my /etc/hosts a local resolution. But in spagobi instance i dont do it.
the real problem is in screenshoot:
java.net.UnknownHostException
I solved it adding in /etc/hosts on spagobi instance the same ip.
Sorry for the inconvenience.

Related

Exim forward router

I am trying to create an exim router where the from and the to headers are being fetched from a mysql database.
As I can not find much documentation about using such a forwarder for non-existing domains on the local server I am quite stuck.
I have the following router where only the receiving mail account is being matched at the moment:
virtual_user_fwd:
driver = redirect
verify = no
data = ${lookup mysql{SELECT adress FROM mail_forwards WHERE host = '${quote_mysql:$domain}' AND fwd IS NOT NULL} {${sg{$value}{\\n}{, }}}}
I need the next step: Somewhere/Somehow where I define the mail account where the mails are forwarded to.
Is there anyone who can help me get to the next step?
I have found a new way to create the mysql link
virtual_userforward:
driver = redirect
verify = no
data = ${lookup mysql { SELECT goto FROM mail_forwards WHERE adress='${local_part}#${domain}'}}
domains = *
This seems to work for the virtual test, however when testing an email I get an error 'unroutable adress'. Any ideas?

C# WebRequest to a URL that is configured for Windows Authentication

I am trying to get user photos out of Microsoft Exchange using the GetUserPhoto REST request documented here: https://msdn.microsoft.com/en-us/library/office/jj190905%28v=exchg.150%29.aspx?f=255&MSPPError=-2147217396
My problem is no matter what I do the connection gets closed automatically and it can't authenticate using NTLM. Microsoft even provides code but when you run this in a IIS web application even if it is using an application pool running as a domain user, it never can authenticate.
This is my current code that isn't working:
request = System.Net.WebRequest.Create($"https://{Settings.ExchangeServer}/ews/exchange.asmx/s/GetUserPhoto?email={primarySmtpAddress}&size=HR240x240") as System.Net.HttpWebRequest;
request.ServerCertificateValidationCallback = delegate { return true; };
request.UseDefaultCredentials = true;
resp = request.GetResponse() as System.Net.HttpWebResponse;
Now I can put this in a console application and run it and then it works. But in IIS it just won't work at all. I've even tried RestSharp with no luck.
Sounds like a delegation issue eg the credentials your impersonating can only be used to access resources local to the IIS server they are being impersonated on. For you to access Exchange you need to have delegation configured correctly see https://blogs.msdn.microsoft.com/emeamsgdev/2012/11/05/ews-from-a-web-application-using-windows-authentication-and-impersonation/
The problem was it wasn't trying to connect with TLS 1.2. Once it clicked in my head, the error message was saying the connection closed and not actually returning a 401. I user ServiceManager to set it to TLS1.2 and then it started working.
Glen Scales help point me in the right direction though to troubleshoot it further.

XMPPError:forbidden auth error while creating new user using smack 4.1.2

I am trying to create user using smack client 4.1.2. I am getting below error.
Send XML on stream = <<"<iq from='abc.example.com' to='admin#abc.example.com/Smack' id='Dym8b-14' type='error'><query xmlns=jabber:iq:register><password>xxxxxx</password><username>user</username><registered/></query><error code=403 type=auth><forbidden xmlns=urn:ietf:params:xml:ns:xmpp-stanzas/></error></iq>">>
My ejabberd config looks like below (.yml file)
register_from:
admin: allow
...
access_from: register_from
access: register
I am still getting above error. Please help
Adding code snippet to show how I create new user using smack 4.1.0
connection = new XMPPTCPConnection(getConnectionConfiguration());
connection.connect();
connection.login("admin", "admin");
if(connection.isAuthenticated())
{
AccountManager accountManager = AccountManager.getInstance(connection);
accountManager.sensitiveOperationOverInsecureConnection(true);
accountManager.createAccount(userName, password);
connection.disconnect();
// The account has been created, so we can now login
connection.login(userName, password);
}
private XMPPTCPConnectionConfiguration getConnectionConfiguration()
{
XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()
.setServiceName("abc.example.com")
.setHost("abc.example.com")
.setPort(5222)
.build();
return config;
}
I found the issue. It was due to trusted_network tag had value as loopback:allow in ejabberd config file. I changed it to all:allow. It started working.
The snippet of configuration you provide is too small and badly indented, so it is impossible to tell you what is wrong in your configuration.
However, considering your config is correct, you should check that your user is properly authenticated with the right ACL credentials before sending the register request. Most client libraries assume self user registration and try to send the register before doing any form of authentication.

FIWARE Object Storage "no tenants available"

When using the Object Storage GE node.js connector implementation from https://github.com/arvidkahl/fiware-object-storage we encounter the problem "no tenants available". We tested with two different community accounts where we first set up an object container within the fiware cloud.
We are able to Receive an Auth Token and get a connection established message, but then we do not get the tenant ID i think. has anyone experienced something like that and can help or give us a better understanding of what is going wrong here?
we installed the fiware-object-storage with npm install fiware-object-storage.
this is our connection code:
var fiwareObjectStorageConfig = {
auth : conf.fiware.auth_url, // IP of the Auth Services, likely "cloud.lab.fi-ware.org"
url : conf.fiware.object_storage_url, // IP of the Object Storage GE -> "cloud.lab.fi-ware.org"
user : conf.fiware.user, // Your FIWARE account email
password : conf.fiware.password, // Your FIWARE account password.. i know.. no comment.
container : conf.fiware.container // Whatever container you want to connect to
};
var fiwareObjectStorage = require('fiware-object-storage');
fios = fiwareObjectStorage(fiwareObjectStorageConfig);
fios.connectToObjectStorage(function() {
console.log(fios.getFileList());
});
This library is a third party library and it is not an official FIWARE implementation.
As you said, there is a problem with this library. I have tested and it needs some fixes. I could not reproduce your error with my account but I have another one while getting file list.
The best option is waiting for their developers to improve that simple library like select Tenant in config file. By now it takes the first tenant on the list.
This is my config file to access Spain2 object store:
fiwareObjectStorageConfig = {
url : '172.32.0.144',
auth : 'cloud.lab.fi-ware.org',
container : 'myContainer',
user : "", // Your FIWARE account email
password : "" // Your FIWARE account password.
};

Passing parameters to service by URL - How do I discover the parameter names?

I have a report to which I have execute-only access - I don't have the access to the RDL file. This report exposes several parameters which I would like to set from URL.
I've successfully changed some parameters using the standard param=data form (as explained here: http://msdn.microsoft.com/en-us/library/ms153586.aspx). However, some parameters don't have the same parameter-prompt and parameter-name.
Unfortunately, to pass parameter values by URL I must know the name of the parameter and I don't see how I can deduct from the report and its parameters prompt text. I've tried to inspect the source and post-data but to no avail.
Anyone has an idea?
Thanks
P.S I also stumbled on this: http://odetocode.com/Articles/123.aspx. However, I wasn't able to connect to the web-services of my report server.
Ugh. I'm replying to myself, hopefully someone can learn from it:
I did it, eventually, using Reporting Services web service as described here and here. A point to remember here is that the name of the service has been changed (I believe from SQL server 2005 and onward) endpoint is ReportService2005.asmx.
After adding the web reference I was still having various problems. To summarize, this is the code that eventually worked for me (note: I am in domain and the IIS I'm connecting to requires domain windows auth).
ReportParameter[] parameters;
const string historyId = null;
const bool forRendering = true;
ParameterValue[] values = null;
DataSourceCredentials[] credentials = new DataSourceCredentials[] {};
ReportingService2005SoapClient c = new ReportingService2005SoapClient();
c.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("USERNAME", "PASSWORD", "DOMAIN");
c.ClientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation;
c.GetReportParameters
(
"/CycleStatus/Builds Score",
historyId,
forRendering,
values,
credentials,
out parameters
);
However, I was plagued by the following error:
"The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'"
To handle that you need to change, in your app.config the security node, like so:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
After that everything worked fine.