Project

General

Profile

Actions

Bug #10386

closed

In the arvados sso database, multiple identical clients can be created

Added by Javier Bértoli over 7 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
-
Story points:
-

Description

The tutorial http://doc.arvados.org/install/install-sso.html, section Create arvados-server client, explains how to create a `client` record using the `rails console`. Following it, I found that, running the same script multiple times, they will all succeed and multiple identical entries will be added to the database.

Way to reproduce it:

1. Create a file with the content

    cat > /tmp/sso_client << EOF
c = Client.new
c.name = "joshid" 
c.app_id = "arvados-server" 
c.app_secret = "some_string" 
c.save!
quit
EOF

2. Feed it multiple times to the rails console

    su - nginx -s /bin/bash -c "cd /var/www/arvados-sso/current; export RAILS_ENV=production; `which rvm-exec` default bundle exec rails console < /tmp/sso_client" 

The database will show

postgres=# \q
-bash-4.2$ psql arvados_sso_production
psql (9.2.15)
Type "help" for help.

arvados_sso_production=# select * from clients;
 id |  name   |   app_id   |      app_secret       |         created_at         |         updated_at         
----+---------+------------+-----------------------+----------------------------+----------------------------
  1 | josh_id | sso_client | they_call_this_secure | 2016-10-23 13:06:49.204892 | 2016-10-23 13:06:49.204892
  2 | josh_id | sso_client | they_call_this_secure | 2016-10-23 13:21:27.679959 | 2016-10-23 13:21:27.679959
  3 | josh_id | sso_client | they_call_this_secure | 2016-10-23 13:29:05.821768 | 2016-10-23 13:29:05.821768
  4 | josh_id | sso_client | they_call_this_secure | 2016-10-23 13:30:49.447064 | 2016-10-23 13:30:49.447064
  5 | josh_id | sso_client | they_call_this_secure | 2016-10-26 21:08:24.849962 | 2016-10-26 21:08:24.849962
  6 | josh_id | sso_client | they_call_this_secure | 2016-10-26 21:11:16.888335 | 2016-10-26 21:11:16.888335
(6 rows)

Actions #1

Updated by Tom Morris over 6 years ago

  • Target version set to Arvados Future Sprints
Actions #2

Updated by Lucas Di Pentima over 3 years ago

  • Status changed from New to Closed
Actions #3

Updated by Ward Vandewege over 3 years ago

  • Target version deleted (Arvados Future Sprints)
Actions

Also available in: Atom PDF