Giter Club home page Giter Club logo

Comments (6)

f0086 avatar f0086 commented on May 29, 2024

Sure! This task need to be done.
Feel free to implement it and create a pull request if you need it ASAP.

from ruby-openstack.

f0086 avatar f0086 commented on May 29, 2024

I've implemented Identity v3 on a feature branch.
https://github.com/nitrado/ruby-openstack/tree/identity-v3

Can you please try it out and report any problems?
Use it as follows:

compute = OpenStack::Connection.create({
                                             username: '7a7700414cfc4910afd2a324e51d19d9',
                                             api_key: 'devstack',
                                             auth_method: 'password',
                                             auth_url: 'http://192.168.66.110:5000/v3',
                                             service_type: 'compute',
                                             authentenant_name: '63ef53e45c484272ac56c7db77996c1b',
                                             is_debug: true})
assert_true(compute.authok?)
compute.servers
    ...

auth_method can be "password" or "token". The username has to be the user id, the `authentant_name`` has to be the project id you want to access.

from ruby-openstack.

stenstad avatar stenstad commented on May 29, 2024

Hi, I took a quick look at the code, and it seems the JSON is incomplete. Among other things the domain is missing.

Here is a valid JSON request to authenticate as user "mistertest" in domain "testdomain.com" with a password. We're here also asking to be scoped to the tenant "standard" in the domain "testdomain.com". I think you might be able to skip the tenant scope and be scoped to the default tenant for the user, but I'm not 100% sure.

Remember that a user in a domain can scope a token to a project in another domain as well. In OSC you have the environment variables OS_USER_DOMAIN_NAME (and _ID) to set domain the user belongs to, and OS_PROJECT_DOMAIN_NAME (and _ID) to set what domain the project you want to scope to belongs to.

{ "auth":{  
      "identity":{  
         "methods":[  
            "password"
         ],
         "password":{  
            "user":{  
               "name":"mistertest",
               "domain":{  
                  "name":"testdomain.com"
               },
               "password":"supersecret"
            }
         }
      },
      "scope":{  
         "project":{  
            "name":"standard",
            "domain":{  
               "name":"testdomain.com"
            }
         }
      }
   }
}

from ruby-openstack.

mikaelhm avatar mikaelhm commented on May 29, 2024

I gave this a go: #85

from ruby-openstack.

BirknerAlex avatar BirknerAlex commented on May 29, 2024

FYI: I am currently reviewing the PR #85 of @mikaelhm. Should be going live soon as new release version.

from ruby-openstack.

BirknerAlex avatar BirknerAlex commented on May 29, 2024

The Identity v3 is already live since a few days in version v3.1.0.

from ruby-openstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.