Removing authentication in Websphere - web-services

Currently my server.xml contains this :
<basicRegistry id="basic" realm="customRealm">
<user name="user#example.com" password="test"/>
</basicRegistry>
I would like to always be logged in as user#example.com without the need for any credentials to be entered.
How can I accomplish this by editing my server.xml or in some other manner?

Related

WSO2 IS whitespaces inside password policy

I have set the following password policy [\sa-zA-Z0-9]{10,30}$ in WSO2 IS in Identity Provider->Resident->Password Policies->Password Patterns.
I have added the \s to support the white spaces but I get an error when trying to add a password with a white spaced within it.
Caused by: org.wso2.carbon.user.core.UserStoreException: 30003 - Credential is not valid. Credential must be a non null string with following format, ^[\S]{5,30}$
I use WSO2 IS 5.9.
Do I have to set any other special characters in the regular expression or to do additional configuration in WSO2 IS?
There is a regex validation at the user-store level too. You can change them by adding the following config to the deployment.toml and restart the server.
(Note: If [user_store] is already defined in the deployment.toml add these configs under the same tag)
[user_store]
password_java_regex="^[\\sa-zA-Z0-9]{10,30}$"
password_java_script_regex="^[\\sa-zA-Z0-9]{10,30}$"
Once the server gets restarted you can see the modified values of PasswordJavaRegEx (regex for backend validation in userstore level) and PasswordJavaScriptRegEx (regex for UI validation) in <wso2is>/repository/conf/user-mgt.xml file.

How to allow '%' to pass in IIS

I have a web app developed using DJANGO. Everything works well on the DJNAGO testing server. However, I tried to host it on IIS web server and it works only one problem I am having.
I have one form (user input) and I want to allow the users to input wildcard such as SCA80%. The problem is that I get 404 error and it seems that IIS blocks it because the URL contains % sign.
How can I make IIS don't check for the % regardless of the security issue concerns? Is there any simple solution to fix it?
That's how the URL looks like when I send my request with a wildcard:
/pareto/article-description/SAC80%25/?type=failure&is_article_desc=True
If I remove the %25 and I put the entire SAC80RKEU211 everything works. Even if I am on the django developing server the %25 works. But not on IIS.
As far as I know, the IIS has introduced URL filtering rules for security reasons.'%' is blocked by default as part of security reason in URL.
I suggest you could try to use below config setting to allow the '%'.
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true">
</requestFiltering>
</security>
</system.webServer>
If this don't solve your issue, please post the details error message and status codes for us to find out the solution.
I solved the problem by encoding the values that I am sending such as % and decoding it so it will replace the value %

Spring WS show WSDL definition at specyfic address

I have problem with displaying my WSDL. I have found a way to dynamic read it from my XSD schema and now i am doing this as:
<sws:dynamic-wsdl id="test"
portTypeName="testPort"
locationUri="/"
targetNamespace="http://testnamespace">
<sws:xsd location="/WEB-INF/test.xsd"/>
</sws:dynamic-wsdl>
this way i got under address : localhost:localport/applicationname/id.wsdl WSDL which in my case is : localhost:8080/MyApp/test.wsdl.
Thing i want to achive is to display this WSDL after executing another request: localhost:8080/MyApp/test.aspx?WSDL How can i edit my code to do so? Can anyone redirect me somewhere if it is described ? I thought about creating a wsdl file instead of xsd but do anyone have an example how to show under specyfic address wsdl file?
From mine experience I recommend You modify your proxy_ajp configuration file add:
ProxyPass /MyApp/test.aspx?WSDL ajp://localhost:8080/MyApp/test.wsdl
then restart your httpd. After this operation all request coming for localhost:8080/MyApp/test.aspx?WSDL will giving the localhost:8080/MyApp/test.wsdl result

How to Add Basic Auth(Pre-emptive) to Web Service Client genrated with Web Platform Tools (WTP0 in Eclipse

I have a web service that I want to consume that requires a username and password. It does not prompt you for the u/p. In SOAPUI 4.5 it is very easy to go to the Auth tab for the web service , choose auth type: premeptive, add the username and password and run the service. I have generated a web service client for this service using Eclipse WTP but I cannot figure out what code to add and where in order to provide this same u/p that works in Soapui. I am fairly new so be specific please (does the code go in the servicebindingstub, serviceporttype, serviceporttypeproxy, and what method ? _init, etc., include imports pls. The wtp client works but returns a error code stating that the username and password are missing. If there is a way to externalize this in the descriptor that would be great also.
Solved this by adding Username and Password lines (last two below) to the Call for each method in the Stub file.
call.setUseSOAPAction(true);
_call.setSOAPActionURI("urn:webservicesapi#getAllVirtualServerConnStats");
_call.setEncodingStyle(null);
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
_call.setSOAPVersion(or`enter code here`g.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("", "getAllVirtualServerConnStats"));
_call.setProperty (Call.USERNAME_PROPERTY, "wstest"); //added this
_call.setProperty (Call.PASSWORD_PROPERTY, "WsTest"); // added this
setRequestHeaders(_call);

Sitecore: loginPage?

I am trying to set a loginPage value on a Sitecore site in the web.config. The file referenced in the loginPage is an Sitecore item, so it is not a psycical page on the server. No matter how i reference to it, it doesnot work. I get one of 2 errors (depending on how i refrecen to the file);
The resource cannot be found.
Error executing child request for /sitecore/login. (The path beeing the one i referenced in the web.config)
Any ideas?
The explanatory comment in web.config says that 'loginPage' attribute should be The path to the login page to use. Must point to a physical file or a page in a site that does NOT require login. 'Require login' means denied Read permissions for the Anonymous user. This Anonymous user is the one in the domain specified for this site.
For instance, if you want to have login page set for the 'website' site, you should make sure that extranet\Anonymous has read permission to the item you specified.
Hope this helps.
The loginPage attribute is actually a URL, not an item path. Include the full path with extension -- e.g. /MyAccount/Login.aspx
Try hitting the url in the browser to your login page. If you cannot reach the page itself or if it throws an error in the browser then accessing it in the web.config will not work.
Once you have the login page coming up in the url in the browser using the path yoursite/login or whatever sitecore tree path you have set up. Then add it to the web.config.
Also, in the content tree you can click on security and access viewer for the login item. Then select the anonymous role. If its is a security issue then you will see which role is affecting the security settings for anonymous.
Type this in browser"Url of ur website/Sitecore/showconfig.aspx" .. Here you will get a combination of all the .config files being used. Also, you can just check in fiddler(a software) to see what else you get in response apart from resource can not be found.
Would be nice if you could also paste the settings you applied in the web.config, but this is how I understand the question.
You wanted to create a client user login page, not overriding the Sitecore login page.
If so, you have to ensure that it's under the home item (sitecore> content >home > YOUR_LOGIN_PAGE).
If outside the home item, eg. sitecore> content >YOUR_WEBSITE > YOUR_LOGIN_PAGE then you have to configure that in the sitedefinition.config because that is somehow treated as a new site and not part of the freshly installed Sitecore.
To validate that you have applied it correctly, try accessing the showconfig page on your browser (eg. http://YOUR_WEBSITE/sitecore/admin/showconfig.aspx)
Additional stuffs you might want to double check:
Make sure you were able to publish it on the web database, if not try accessing in the preview mode
Make sure that the item has layout and rendering definition. Otherwise, it won't work.
Make sure you have the right permission, for you to be able to access the page. I would assume you're in the admin role
This issue can be caused by modified setting :
<setting name="RequestErrors.UseServerSideRedirect" value="false" />"
which is false by default.
According to notes in config file If true, Sitecore will use Server.Transfer instead of Response.Redirect. But Server.Transfer is not good option for regular login page redirect because:
ASP.NET does not verify that the current user is authorized to view the resource delivered by the Transfer method.
You can change it in Sitecore.config file
<site name="shell" ... loginPage="yoururl" ... />
<site name="login" ... virtualFolder="/yoururl" ... />
<site name="admin" ... virtualFolder="/yoururl" ... loginPage="/yoururl/login.aspx" />