cf-uaac 3.1.6 → 3.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60ae15860d77b0b2f0c132a4c356b244346b438c
4
- data.tar.gz: 97cb870f7936e8cc67c4bfa4284e7e7281f1870a
3
+ metadata.gz: c7d94b0c99e65a95ea8973d615886e3c34f53726
4
+ data.tar.gz: fb96fbcfe4e8e5a65f2ff631b87289b82561b802
5
5
  SHA512:
6
- metadata.gz: c52ff8e0adb7e9df5270f557626c6b5e4d996a842bc9736242b836e3a1ebcafe70386053277cabc1df2781e7e09a7c65c03661e2cce8a23ef00bb581e858e27b
7
- data.tar.gz: 60340d5967d8dab9babdc1d5ba34f2ab300a4e83b2871717d46f32ce3fc2e7a60ecd53e90067a40c723ab27e3e68c7d7035e5ec5ad087463b56b5d46bf28361c
6
+ metadata.gz: 97d98de132132cbbb5e227e232cce7959edbf3917e776983ec8007e2221ad825fc74c50001c3e7570c00be253fbfdd2960be5cb489412f95cd7a1c57d163961a
7
+ data.tar.gz: 01dd3c1946a31587b5d149d7b4d2b80b6ecad0d19194cc176373d407b9fe43d9663dda7036ddc48c9e80ec4e6d4781e99f3091085259add4ea5d7272663c34d5
data/README.md CHANGED
@@ -3,41 +3,68 @@
3
3
  [![Build Status](https://travis-ci.org/cloudfoundry/cf-uaac.svg?branch=master)](https://travis-ci.org/cloudfoundry/cf-uaac)
4
4
  [![Gem Version](https://badge.fury.io/rb/cf-uaac.png)](https://rubygems.org/gems/cf-uaac)
5
5
 
6
- ## Build the gem
6
+ ## Installation
7
7
 
8
- $ bundle install
9
- $ gem build cf-uaac.gemspec
8
+ From Rubygems:
10
9
 
11
- ## Install it
10
+ `gem install cf-uaac`
12
11
 
13
- $ gem install cf-uaac*.gem
12
+ Or to build and install the gem:
14
13
 
15
- or from rubygems
14
+ ```
15
+ bundle install
16
+ gem build cf-uaac.gemspec
17
+ gem install cf-uaac*.gem
18
+ ```
16
19
 
17
- $ gem install cf-uaac
18
20
 
19
- ## Run it
21
+ ## Concepts
20
22
 
21
- $ uaac help
22
- $ uaac target uaa.cloudfoundry.com
23
- $ uaac token get <your-cf-username>
24
- $ uaac token decode
23
+ The user uses a client (like a webapp, or uaac) to do things. The client and the user have different secrets; both the user's and client's secret are passwords.
24
+
25
+
26
+ ## Connecting and logging in
27
+
28
+ * `uaac help` opens up the help menu and shows a full list of commands.
29
+ * `uaac target` tells UAAC which UAA you're targeting. e.g. `uaa.example.io`.
30
+ * `uaac target <target-number>` lets you choose a registered target.
31
+ * `uaac targets` lists all registered targets.
32
+ * `uaac token client get (-s <your-client-secret>)` authenticates and gets your token so it can be used by UAAC. The `-s` or `--secret` flag is for inputting your secret, otherwise it will be asked for by UAAC.
33
+
34
+ Now that UAAC has your token, you're able to run commands and hit the endpoints that your client has the proper scopes for. A list of scopes can be found in [UAA's API documentation.](https://github.com/cloudfoundry/uaa/blob/master/docs/UAA-APIs.rst#scopes-authorized-by-the-uaa)
25
35
 
26
36
  To use the APIs, see: https://github.com/cloudfoundry/cf-uaa-lib
27
37
 
38
+
39
+ ## Creating clients
40
+
41
+ Authenticate as `admin`, or a user with the right permissions: `clients.admin` or `clients.write`.
42
+
43
+ `uaac client add -i` brings up the interactive interface. If entering multiple values, separate them with commas.
44
+
45
+ Scopes and authorities are different in the context of a client.
46
+
47
+ * Scopes is a list of permitted scopes for this client to obtain on behalf of a user.
48
+ * Authorities is a list of granted authorities for the client, such as `uaa.admin` or `scim.invite`.
49
+
50
+ `uaac contexts` will list the scopes for a client, which correspond to the users' authorities.
51
+
52
+
28
53
  ## Tests
29
54
 
30
55
  Run the tests with rake:
31
56
 
32
- $ bundle exec rake test
57
+ `bundle exec rake test`
33
58
 
34
59
  Run the tests and see a fancy coverage report:
35
60
 
36
- $ bundle exec rake cov
61
+ `bundle exec rake cov`
37
62
 
38
63
  Run integration tests (on a server running on localhost:8080/uaa):
39
64
 
40
- $ export UAA_CLIENT_ID="admin"
41
- $ export UAA_CLIENT_SECRET="adminsecret"
42
- $ export UAA_CLIENT_TARGET="http://localhost:8080/uaa"
43
- $ bundle exec rake test
65
+ ```
66
+ export UAA_CLIENT_ID="admin"
67
+ export UAA_CLIENT_SECRET="adminsecret"
68
+ export UAA_CLIENT_TARGET="http://localhost:8080/uaa"
69
+ bundle exec rake test
70
+ ```
@@ -68,7 +68,7 @@ class ClientCli < CommonCli
68
68
  *CLIENT_SCHEMA.keys, :clone, :secret, :interact do |id|
69
69
  pp scim_request { |cr|
70
70
  opts[:client_id] = clientid(id)
71
- opts[:name] = clientname()
71
+ opts[:name] = clientname() || opts[:client_id]
72
72
  opts[:secret] = verified_pwd("New client secret", opts[:secret])
73
73
  defaults = opts[:clone] ? Util.hash_keys!(cr.get(:client, opts[:clone]), :sym) : {}
74
74
  defaults.delete(:client_id)
@@ -33,7 +33,7 @@ class CommonCli < Topic
33
33
  def userpwd(pwd = opts[:password]); pwd || ask_pwd("Password") end
34
34
  def clientid(id = opts[:client]); id || ask("Client ID") end
35
35
  def clientsecret(secret = opts[:secret]); secret || ask_pwd("Client secret") end
36
- def clientname(name = opts[:name]); name || ask("Client name") end
36
+ def clientname(name = opts[:name]); name end
37
37
 
38
38
  def verified_pwd(prompt, pwd = nil)
39
39
  while pwd.nil?
@@ -14,6 +14,6 @@
14
14
  # Cloud Foundry namespace
15
15
  module CF
16
16
  module UAA
17
- CLI_VERSION = "3.1.6"
17
+ CLI_VERSION = "3.1.7"
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-uaac
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.6
4
+ version: 3.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Syer
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-01-12 00:00:00.000000000 Z
15
+ date: 2016-02-12 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
276
  version: '0'
277
277
  requirements: []
278
278
  rubyforge_project: cf-uaac
279
- rubygems_version: 2.2.3
279
+ rubygems_version: 2.2.2
280
280
  signing_key:
281
281
  specification_version: 4
282
282
  summary: Command line interface for CloudFoundry UAA