LDAP-Error in Identity Server 4.6 when using user registration with "Ask password from user" - password-recovery

I wanted to try the password-notification feature of the IS 4.6 but it throwing an exception.
I followed those links:
https://docs.wso2.org/display/IS460/Recover+with+Notification
http://cgchamath.blogspot.mx/2013/12/wso2-identity-server-user-creation-with.html
This is the error I am getting
Here is the Stacktrace
Caused by: org.wso2.carbon.identity.base.IdentityException: Error
while persisting identity user data in to user store at
org.wso2.carbon.identity.mgt.store.UserStoreBasedIdentityDataStore.store(UserStoreBasedIdentityDataStore.java:81)
at
org.wso2.carbon.identity.mgt.IdentityMgtEventListener.doPostAddUser(IdentityMgtEventListener.java:420)
... 124 more Caused by: org.wso2.carbon.user.core.UserStoreException:
One or more attributes you are trying to add/update are not supported
by underlying LDAP. at
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doSetUserClaimValues(ReadWriteLDAPUserStoreManager.java:874)
at
org.wso2.carbon.identity.mgt.store.UserStoreBasedIdentityDataStore.store(UserStoreBasedIdentityDataStore.java:73)
... 125 more Caused by:
javax.naming.directory.NoSuchAttributeException: [LDAP: error code 16
- NO_SUCH_ATTRIBUTE: failed for Modify Request
Object : 'uid=testUser,ou=Users,dc=wso2,dc=org'
Modification[0]
Operation : replace
Modification
http://wso2.org/claims/identity/passwordTimestamp: 1398394865706
Modification1
Operation : replace
Modification
initials: false : ERR_04269 ATTRIBUTE_TYPE for OID http://wso2.org/claims/identity/passwordtimestamp does not exist!];
remaining name 'uid=testUser' at
com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3108) at
com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3033) at
com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2840) at
com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1411) at
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:253)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:165)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:154)
at
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doSetUserClaimValues(ReadWriteLDAPUserStoreManager.java:859)
... 126 more
I can imagine that the application is generating a timestamp for the expiration of the password and tries to save in a field in the LDAP which is mapped by the combination:
http://wso2.org/claims/identity/passwordtimestamp -> nickName
This mapping is wrong obviously.
How can I force an adequate mapping so the process is saving the user in the right way (and hopefully sending the email after that ...)?
Thanks in advance.

First problem on this way solved:
I had to re-add the claim of the password time stamp, but with the correct uri:
http://wso2.org/claims/identity/passwordTimestamp
Also helpful was:
https://wso2.org/jira/browse/IDENTITY-1200
The LDAP-error is fixed, but still it is not sending the email. But that is another issue

Related

Conenct Talend with Snowflake cloud

I am new using Talend and Snowflake cloud.
I am trying to conet Talend using the component "Snowflake Connection", and complete with this settings:
user:XXX
password: YYY
Schema: TPCH_SF1
Database: SNOWFLAKE_SAMPLE_DATA
and give me this error: .net.snowflake.client.jdbc.SnowflakeSQLException: Incorrect username or password was specified.
But this user I can enter in Snowflake.
Can anyone help me please.
I tried reproducing it. Just to clarify different component what error comes through i have written down all different error come when which component throws error.
If snowflake account is wrong
java.lang.RuntimeException: JDBC driver encountered communication error. Message: HTTP status=403.Incorrect Snowflake Account was specified
For this error we need to change the account name
Snowflake Region is wrong for valid snowflake account. 403 error is thrown
something like below.
"ERROR [main, net.snowflake.client.jdbc.SnowflakeUtil:logResponseDetails:449] -- Response content: 403 ERROR "
you can define region name in Advance setting by checking in use Custom Snowflake Region for connection.
Snowflake username or password is incorrect for the account.
JDBC driver not able to connect to Snowflake. Error code: 390100, Message: Incorrect username or password was specified..
Hope this helps.

getting error when enter uri for timeseries ingest

Hi I am trying to save data in timeseries db but I am facing an error at timeseries ingest when I enter wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages in websocket uri it shows an error like this when I click on open socket
The request failed with status code: 500
{
"error": "Error: unexpected server response (401)",
"url": "wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages"
}
and see this screenshot once.
Thanks&regards
Eswar G
From the error log, it looks you got authorization error. Check if you are using correct predix-zone-id of the time-series instance in the request header or you have configured correct UAA instance in predix tool kit.
Have you updated your UAA client with timeseries authorities?
To inserting time series data with particular user or client need permission. For getting permission, you need to add authorities into your UAA client.
Following are the authorities for timeseries.
Experiencing a similar problem. I'm posting only one of several received error messages. I've cycled through combos of the following for uri and zone id:
uri:
wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages
https://time-series-store-predix.run.aws-usw02-pr.ice.predix.io/v1/datapoints
zone-id:
44853a54-3ecd-4589-85da-b54f2fda7cce
and the zone id shown in the photo, with .ingest at the end.
so, 401 unauthorized.
Did you happen to re-create the timeseries or uaa? Perhaps they are not associated. Also, I'm assuming you did "login as client" in the top menu.
Might be a good idea to create a new timeseries tied to that uaa. Then use the new zoneId.
Did you add predix..ingest and predix..user to the scope and authorities section in uaa client in your predix.io account. Please check the client id to add permission for in websocketriver.config file.

Fedex address validation failed

I am using rails 2.3.17, I have used fedex .
I have used the plugin https://github.com/kdonovan/fedex
I have a customer who has account in fedex. But while shipping from the site , I am getting the error as
Fedex address validation failed. Check address details. Error messages: MODIFIED_TO_ACHIEVE_MATCH. Delivery Point: UNAVAILABLE. Residential Status: BUSINESS
Any guess why this is happening ?
Thanks
EDIT
address_request_details: AvenueStateOrProvinceCodeWICityWausauWebAuthenticationDetailUserCredentialPasswordhTJxEaH7fXDqYtNaPFsPIDAy6KeyXl4QkKWZbZpxhzaIVersionMajor2ServiceIdavalIntermediate0Minor0
process_address_request: #<SOAP::Mapping::Object:0x346dedc
{http://fedex.com/ws/addressvalidation/v2}HighestSeverity="SUCCESS"
{http://fedex.com/ws/addressvalidation/v2}Notifications=#<SOAP::Mapping::Object:0x346d4f0
{http://fedex.com/ws/addressvalidation/v2}Severity="SUCCESS" {http://fedex.com/ws/addressvalidation/v2}Source="wsi">
{http://fedex.com/ws/addressvalidation/v2}Version=#<SOAP::Mapping::Object:0x3469bac {http://fedex.com/ws/addressvalidation/v2}ServiceId="aval"
{http://fedex.com/ws/addressvalidation/v2}Major="2"
{http://fedex.com/ws/addressvalidation/v2}Intermediate="0" {http://fedex.com/ws/addressvalidation/v2}Minor="0"> {http://fedex.com/ws/addressvalidation/v2}ReplyTimestamp="2014-04-21T04:25:59.044-05:00" {http://fedex.com/ws/addressvalidation/v2}AddressResults=#<SOAP::Mapping::Object:0x3464508
{http://fedex.com/ws/addressvalidation/v2}ProposedAddressDetails=#<SOAP::Mapping::Object:0x3463f54 {http://fedex.com/ws/addressvalidation/v2}Score="58" {http://fedex.com/ws/addressvalidation/v2}
Changes="MODIFIED_TO_ACHIEVE_MATCH" {http://fedex.com/ws/addressvalidation/v2}ResidentialStatus="BUSINESS" {http://fedex.com/ws/addressvalidation/v2}
DeliveryPointValidation="UNAVAILABLE" {http://fedex.com/ws/addressvalidation/v2}Address=#<SOAP::Mapping::Object:0x345f4b8 {http://fedex.com/ws/addressvalidation/v2}StreetLines="1000 S 17TH AVE"
{http://fedex.com/ws/addressvalidation/v2}City="WAUSAU" {http://fedex.com/ws/addressvalidation/v2}StateOrProvinceCode="WI" {http://fedex.com/ws/addressvalidation/v2}PostalCode="54401-5741" {http://fedex.com/ws/addressvalidation/v2}CountryCode="US"> {http://fedex.com/ws/addressvalidation/v2}RemovedNonAddressData="">>>
Per the edit, FedEx is not returning an error - you are getting back SUCCESS.
MODIFIED_TO_ACHIEVE_MATCH is very common in a FedEx response - it means that the user entered an address which required some changes. Compare the original data to the response and determine if you want to overwrite it or keep as-is. Alliteratively, many sites are coded to show the original address and the standardized address side by side so the user can "update" to the standardized version. Be aware that FedEx (and UPS) validation can be destructive at times.

I'm getting troubles while uploading to Youtube with google java client: "Invalid value for: listed is not a valid value"

I'm trying to upload videos using https://code.google.com/p/youtube-api-samples/source/browse/samples/java/youtube-cmdline-uploadvideo-sample/src/main/java/com/google/api/services/samples/youtube/cmdline/youtube_cmdline_uploadvideo_sample/UploadVideo.java example
I've successfully registered on the youtube console and have obtained the client_secrets.json at https://code.google.com/apis/console/?api=youtube#project:340964720118:access
I have installed the secrets so my app can access them; everything is compiled well, but when the program is executed, I'me getting that strange errors:
GoogleJsonResponseException code: 400 : Invalid value for: listed is not a valid value
com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Invalid value for: listed is not a valid value",
"reason" : "invalid"
} ],
"message" : "Invalid value for: listed is not a valid value"
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:423)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
I can't find out what is wrong; since the request itself is deeply encapsulated, I can't understand what is wrong with the request...
UPD.
Thanks to
System.out.println(videoInsert.getHttpContent().toString());
call inserted before the
Video returnedVideo = videoInsert.execute();
in the sample code, I got that the JSOn formed and sent to the google is
{snippet={description=Video uploaded via YouTube Data API V3 using the Java library on Sun Sep 29 20:29:30 MSK 2013, tags=[test], title=Test Upload via Java on Sun Sep 29 20:29:30 MSK 2013}, status={privacyStatus=listed}}
But actually there is still a question what is wong with this json and why it causes the error on the the server side.
UPD 2:
And no I no longer get the message above, but the upload is still impossible. I'm getting 401 Error while trying to upload the file in that lines of the example above:
System.out.println(videoInsert.getJsonContent().toString());
System.out.println(videoInsert.getHttpContent().getType());
Video returnedVideo = videoInsert.execute();
System.out.println(returnedVideo.getId());
I supposed that I haven't authorized the request to my personal data, but I actually DID it (the request was loaded to the default browser where I have accepted it and specified the account I would like to work with). However, there is no way to check that authoriation; my google account data holds only Apps and Activity log for the google+ apps; I haven't fount my app in the list. So where I can check where I'm not logged in?
IOException: 401 Unauthorized
com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 Unauthorized
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:423)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at ScreenRecordingExample.UploadToYoutube(ScreenRecordingExample.java:356)
Ok, I have found out that the problem appeared due to the incorrect privacyStatus value:
I had
status.setPrivacyStatus("listed");
in my code, while it seems that only public, unlisted and private are possible values
And the UPD-2 problem was resolved unfortunately in the way i don't know exactly how:
i have noticed, that in my code example there was a line
return new AuthorizationCodeInstalledApp(flow, localReceiver).authorize("user");
I have replaced 'user' with my google user name (but actually I'm not sure that it was a thing that was really needed). After that replacement the authorization attempt started again (default browser loaded the accept/decline page and there I should select one of two accounts). Since I have two accounts, the original youtube one and the common google one, and during the last attempt I have selected the google's one and got 401 error, I have selected the youtube's one this time.
so, after that the problem was resolved. I still don't know do it due to the correct username instead of 'user' or due to the correct account selection. If someoune kows the truth, please comment!

Trouble with authlogic_rpx

I'm trying to run http://github.com/tardate/rails-authlogic-rpx-sample (only rails version was changed) but get error message http://gist.github.com/385696, when RPX returns information after successful authentication via Google Account. What is wrong here? And how I can fix it?
The code was successfully tested with rails 2.3.3 by its author: http://rails-authlogic-rpx-sample.heroku.com/
I run on Windows with cygwin and rails (2.3.5), rpx_now (0.6.20), authlogic_rpx (1.1.1).
Update
In several hours RPX rejected my app http://img96.imageshack.us/img96/2508/14128362.png
Update2
The same error message ( http://gist.github.com/386124) appears with http://github.com/grosser/rpx_now_example , but in this case RPX allows me to sign in (so far).
Solved
See below
Got error: Invalid parameter: apiKey (code: 1), HTTP status: 200
You have to first register your RPX app at http://www.RPXnow.com and set its name. You'll be assigned an API key which you should set in the config/environment.rb file:
RPX_API_KEY = ENV["RPX_API_KEY"]
RPX_APP_NAME = "your_app_name_here!"
Or: Read slide 35: http://www.slideshare.net/tardate/srbauthlogicrpx
You shouldn't have any constraints enforced at the database level.
The reason was trailing \r character in my API key. Apparently, non of the steps did key trimming and the exception was not processed in a good way.

Resources