SAMLart How built it? - saml

Well, i have 2 apps(idp, sp) and I tried to communicate both for Artifact... but i don't knowed how doing...
And I found googling this steps: http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0-cd-02_html_19b6d40c.gif
but now i questioned... how operate for this via (between step 4 to 5 with Java)?
What object i must build for pass this to SAMLart parameter?
Thanks for Advance!

Looks like you can use this class in opensaml http://www.jarvana.com/jarvana/view/org/opensaml/opensaml/2.4.1/opensaml-2.4.1-javadoc.jar!/org/opensaml/saml2/core/Artifact.html
My guess is that you use this one to send it to SP
http://www.jarvana.com/jarvana/view/org/opensaml/opensaml/2.4.1/opensaml-2.4.1-javadoc.jar!/org/opensaml/saml2/binding/encoding/HTTPArtifactEncoder.html

Related

Pymongo3.6 check_keys not doing it's job

I need dots in my keys in mongo. So, while inserting I am sending 'check_keys = False'. This was working fine for pymongo3.4. But I recently updated to pymongo3.6 and I am getting the InvalidDocument Error even when I am sending check_keys=False. Is there any way around this problem?
db['test'].insert([{'a.b': 'asd'}], check_keys=False}
Please try this out using both Pymongo3.6 and Pymongo3.4
Use insert_one method instead as insert is deprecated, and supply bypass_document_validation=True parameter.
I'm having a similar issue, and I found that update_one seems to not care about the dot (.), so I'm considering to create an empty object first, with insert_one, then add the contents to it later using update_one, that way bypassing that limitation. Not the cleanest solution, but could do the trick.

Updating value on a xml located on the web

I have a file on the web, that looks like this. I would like to update the value a 1 tag
Let's say "tempset" and change 150 for another number. How can i do this? NSURLConnection? NSMutableURLRequest? NSURLRequest? If possible keep it to iOs 4! Thanks!
<Courbe>
<age>45</age>
<tempdesi>150</tempdesi>
<vmininit>35</vmininit>
<tempinit>220</tempinit>
<unittemp>0</unittemp><te_fin_c>220,700,700,700,700,700,700,700,700,700</te_fin_c> <vm_fin_c>50,50,50,50,50,50,50,50,50,50</vm_fin_c>
<grfan_a>1,1,1,1,1,1,1,1,1,1</grfan_a>
<ecarnuit>0</ecarnuit>
<tempset>150</tempset>
<tempsetp>700</tempsetp>
<jo_cou_t>1</jo_cou_t>
<ty_stcha>1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1</ty_stcha>
</Courbe>
You have several options:
create a "service" for this , a kind of API so you can call this service from your client in different languages include ObjectiveC
like http://myserver.com/myobject/set?tempset=1
(in real world, use post and not get for this)
of course, to do this you need to write some server part in your favorite language
provide a way to upload the file and replace it completely, a kind of "upload.php"
Which solution is the best depends on your problem: how this file is generated and maintened

wsdl2 does not show extended functions in ColdFusion 10

I have a simple test setup:
component displayname="test1" extends="test2"
{
remote Any function ping1() {}
}
component displayname="test2"
{
remote Any function ping2() {}
}
When I cal the cfc using test1.cfc?wsdl something strange happens.
When I tell my application to use WSDL version 1 using this.wssettings.version everything looks fine, pretty much the same as in CF9. But when I tell it to use version 2 the function "ping2" does not show up in my definition xml.
Why doesn't WSDL 2 show my extended function "test2" when I call test1.cfc?wsdl ??
I tried this on ColdFusion 10 and both WSDL and WSDL2 do not show the inherited methods. I only see the ping1() function of the test1.cfc, I do not see ping2() inherited from test2.cfc. If you change the "Select web service version" value in the ColdFusion Administrator from 2 (the default) to 1, then ColdFusion 10 performs as ColdFusion 9 does and shows both methods.
On ColdFusion 9, the WSDL shows both methods.
In my opinion, this is a bug in ColdFusion 10, you should log it with Adobe (https://bugbase.adobe.com/), and post the bug number here so others can vote for it. This could break existing functionality if people upgrade without changing the default web services version.
I tried this exact code on CF 9.01 and did not get the same result. My WSDL shows both methods. Something is unique about your CF install - perhaps the wrong version of Axis or something? I'm sorry I can't be more helpful - but I'm struggling to figure out a way to duplicate your issue.

WebDriver and GWT Suggest Boxes

Ok...I give up :)
What is the best way to select values out of a GWT Suggest Box using
WebDriver? I'm using FirefoxDriver, and so far nothing seems to pick
values out of a GWT suggestBox...not sendKeys, not selenium.keyUp,
anything.
I've even tried executing javascript directly to get those values to populate, like this (to no avail):
((JavascriptExecutor) driver).executeScript("document.getElementById('spSelect').value='verizon'");
Is there a better
way? If not, what is the "best" way to get values out of a GWT suggest
Box?
Many thanks in advance.
Cheers
Pedro
Ok, we've figured out our problem.
We were setting explicit IDs on our elements, so our tests can grab
them easier. In GWT this is done via:
usernameLabel.getElement().setId("consoleLoginPageUserNameInput");
This works fine for most GWT inputs, but for the SuggestBox it is
handled a bit differently:
spSelect.getElement().getElementsByTagName("input").getItem(0).setId("spSelect");
After grabbing the correct inner table, we are able to interact with
this input with Selenium just fine. Hope this helps someone.
Cheers
Pedro
Try this javascript (from here):
To set the value:
document.getElementById("spSelect")["value"] = "verizon"
To retrieve it:
var value = document.getElementById("spSelect")["value"];

Customize Error Reporting via E-mail in Pylons

I am sending myself WebApp error reports from Pylons when users hit critical errors and I would love to be able to get the full output of session[] in the reports and customize it to my liking, but I've got no idea how to do that, or where the report is actually created / put together.
Anyone know how I can accomplish that?
The short answer is that you will have to roll your own for this functionality. WebError is the package used to handle this, and it doesn't provide any extension points. Your best bet may be to use a fork of it with your changes, although even then the code is not pretty.
I thank Michael for answering me, without really giving me anything to build on. That meant I had to figure it out myself, and that's always a good thing :)
What I did was, I looked at /config/middleware.py in my Pylons project and found this line:
app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
I made my own ErrorHandler def and my own ErrorMiddleware class at the top of the middleware.py file:
class ClaraErrorMiddleware(ErrorMiddleware):
def exception_handler(self, exc_info, environ):
# do what ever you want with the exc_info or environ vars
super(ClaraErrorMiddleware, self).exception_handler(exc_info, environ) # call parent
pass
def ClaraErrorHandler(app, global_conf, **errorware):
if asbool(global_conf.get('debug')):
return ErrorHandler(app, global_conf, **errorware)
else:
return ClaraErrorMiddleware(app, global_conf, **errorware)
So now, I can throw in some extra variables I want to be sent with my error emails. Simple enough ...