Openstack Identity admin client: cannot find users, roles and services - openstack

I'm using Openstack "ice-house" and the "admin" user. My openstack4j version is 2.0.3.
Using Identity admin client, I can only get a part of my tenants-list.
Even worse, when I try to list "users", "roles" and "services", it returns an empty list or NULL.
Here is my code sample:
OSClient os = OSFactory.builder()
.endpoint("http://localhost:5000/v2.0/")
.credentials("admin", "secret")
.tenantName("admin")
.authenticate();
System.out.println(os.identity().tenants().list()); // Get Only A Part of my tenant list
System.out.println(os.identity().users().list()); // Get Empty List
System.out.println(os.identity().services().list()); // Also Get Empty List
I tried some solutions on Internet. For example:
OSClient os = OSFactory.builder()
.endpoint("http://localhost:5000/v2.0/")
.credentials("admin", "secret")
.tenantName("admin")
.perspective(Facing.ADMIN)
.authenticate();
and I got connection failed (timeout) error.
Then I tried .perspective(Facing.PUBLIC) ,there is no error, however, I still got empty list or NULL.
Anyone could help me about this problem?

i solved using :
OSFactory.enableLegacyEndpointHandling(true);

Related

"Error 404" when posting SignOutUser to Firebase

I write a code to access Firebase.
I use HTTPRequest to login, register, delete account etc.
All work well but one method - logout = SignOutUser - always returns with 404 Error, unknown URL.
Links that work with HTTPRequest:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=%s
https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=%s
https://www.googleapis.com/identitytoolkit/v3/relyingparty/deleteAccount?key=%s
(with proper API key added to the string, of course)
And the one that doesn't work:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/signOutUser?key=%s
What can be the problem? Can it be fixed?
Is there any other way to logout a user?
I write the code in gdscript, but I tried it via web code too, same result.
Thank you in advance!

Reading extensionattribute1 ro extensionattribute15 in AzureAd ClaimsPrincipal

How can I request more claims from the AzureAd server to populate my ASPNET Core Application..?
I'm trying to get claims coming through with AzureAd.
We have extensionattribute1 to extensionattribute15 defined in our onprem, and it's being synced. Yet I can't get them when I study the Claims collection in the ClaimsPrincipal object...
I've set the OpenIdConnectOptions with GetClaimsFromUserInfoEndpoint to true
I tried changing the manifest, but when trying to do so I can't save them (getting error like´Failed to update application AspNetCoreWebApplicationWithAzureAd. Error details: Request_BadRequest´). Additionally I also have no idea or haven't found documentation on what those values are (string / bool / array of strings)
"groupMembershipClaims": null,
"optionalClaims": null,
"acceptMappedClaims": null,
I've been trying to get this working using the steps in this link: https://learn.microsoft.com/en-us/azure/active-directory/active-directory-claims-mapping. The "Example claims mapping policies" section and the comments have some useful info.
So far I've got about half the claims I've mapped to come over during a login via AzureAD. I'm working with Microsoft support to figure out why its not fully working.
If I can get it going I'll post a fuller series of steps to save someone else the pain in the future! But hopefully this gets you going in the meantime.
PS: I had to set "acceptMappedClaims" to true in the application manifest which hasn't been mentioned in any of the articles I've read.

PHP and REST API - Retrieving Company Updates

I'm actually working on displaying my company updates as a feed on my website.
I've created an App on LinkedIn and I'm able to get my security token and list info related to my profile by using the : "https://api.linkedin.com/v1/people/ME".
However, when I'm trying to retrieve my company updates using a GET call on : "https://api.linkedin.com/v1/companies/".$company_id."/updates". I'm getting a :
"Member does not have permission to get company." in the HTTP response message.
Configuration set :
I'm correctly listed as Admin on my company's page
"rw_company_admin" is enabled on my LinkedIn App
My App status is set to "Live"
My company ID is the correct one (I've double checked already)
My token is properly issued and I'm correctly identified by the app
Here is the code I'm using in the PHP method to get the updates :
public function getCompanyUpdates($company_id, $start=0,$count = 20){
if(!$company_id)return false;
$params['url'] = "https://api.linkedin.com/v1/companies/".$company_id."/updates";
$params['method']='get';
$params['args']['format']='json';
if($start != 0 )$params['args']['start']=$start;
if($count != 0 )$params['args']['count']=$count;
$params['args']['event-type']='status-update';
$result = $this->makeRequest($params);
return json_decode($result,true);
}
I'm probably missing a step somewhere, but I've no idea where..
In advance, thanks a lot for your help!!
I fixed the error some weeks ago, but forgot to post the answer that fixes the issue.
My errors :
- At first, I forgot to pass the scope while requesting the Token
- After fixing this, I forgot to re-issue a new Token to get the scope applied
To conclude, it was just an oversight from me.
However, the LinkedIn API is a bit shitty, as it requires to refresh the Token periodically. It should be simplified when we only want to list Public updates that everyone can access.
Cheers

Not able to get nJupiter.DataAccess.Ldap work with our Internal LDAP (Lotus Domino)

I've tried everything possible, to setup nJupiter.DataAccess.Ldap as the membership provider on our intranet based web application built using asp.net 3.5.
Challenges I am facing:
Not able to authenticate the user using the default login webpart (says Your login attempt was not successful. Please try again)
I tried this code and I receive a COMException : "There is no such object on the server."
var ldapMembershipUser = System.Web.Security.Membership.GetUser("username") as LdapMembershipUser;
if (ldapMembershipUser != null)
{
var givenName = ldapMembershipUser.Attributes["givenName"];
}
I have placed my web.config and the nJupiter.DataAccess.Ldap.config here:
web.config : http://pastebin.com/9XdDnhUH
nJupiter.DataAccess.Ldap.config : http://pastebin.com/WsSEhi98
I have tried all possible permutations and combinations for different values in the XML and i am not able to take it forward. Please guide. I just am not able to connec to the LDAP and authenticate the user or even search for users.
Just looking at your config is unlikely to be enough since I don't know your Domino server's confguration, so my answer isn't an attempt to fix your problem. It's an attempt to teach you how I would approach it if it were my problem. Here's what I do to troubleshoot connections and queries from code to Domino LDAP:
Configure the Domino LDAP server for logging the highest level of debug information with the notes.ini setting LDAPDEBUG=7. See this IBM technote for more info.
Use an LDAP client and figure out how to successfully connect to the Domino LDAP server. I like the free Softerra client for this. Check the logs and save off the info from your successful connection.
Now run your code and compare what you see in the logs against the successful connection.
If the code is making it past authentication but failing on the query, then find the actual query in the log, go back to your LDAP client, figure out what the query should have been, and adjust your code's configuration appropriately.

Twitterizer.TwitterUser.IsFollowing returns null

I am using Twitterizer to integrate Twitter into my ASP.NET app. After authenticating the user I am using following code to see if the authenticated user is following a specific user:
Twitterizer.TwitterUser followed = new Twitterizer.TwitterUser();
followed.ScreenName = tw_current_like;
bool? Following = followed.IsFollowing;
However Following.HasValue is always false. Am I missing something?
As I stated on the forums. Instantiating TwitterUser will not fetch any data from Twitter.
Also, the Twitter API is spotty in how/when it supplies the following indicator. You can use TwitterFriendship.Show(OAuthTokens, decimal/string) to query details about the relationship between the authenticated user and another user.

Resources