[2/2] incubator-trafficcontrol git commit: This closes #847

2017-08-23 Thread hbeatty
This closes #847


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/b0178489
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/b0178489
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/b0178489

Branch: refs/heads/2.1.x
Commit: b01784897c3d1bc4be330d291152bbf2b69485d0
Parents: fd9bf25
Author: Hank Beatty 
Authored: Wed Aug 23 09:48:55 2017 -0400
Committer: Hank Beatty 
Committed: Wed Aug 23 09:48:55 2017 -0400

--

--




[1/2] incubator-trafficcontrol git commit: corrects reset password link to match format of TP

2017-08-23 Thread hbeatty
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/2.1.x 1d4e2a4d5 -> b01784897


corrects reset password link to match format of TP

(cherry picked from commit 404b4a0362a38c2656b53cbe056b7675b902c162)


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/fd9bf259
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/fd9bf259
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/fd9bf259

Branch: refs/heads/2.1.x
Commit: fd9bf259d6fe4eeb5705acbf1ee7efc9fc96aa24
Parents: 1d4e2a4
Author: Hank Beatty 
Authored: Wed Aug 23 09:41:42 2017 -0400
Committer: Hank Beatty 
Committed: Wed Aug 23 09:41:42 2017 -0400

--
 traffic_ops/app/templates/user/reset_password.mail.ep | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/fd9bf259/traffic_ops/app/templates/user/reset_password.mail.ep
--
diff --git a/traffic_ops/app/templates/user/reset_password.mail.ep 
b/traffic_ops/app/templates/user/reset_password.mail.ep
index 925ab93..830ffb9 100644
--- a/traffic_ops/app/templates/user/reset_password.mail.ep
+++ b/traffic_ops/app/templates/user/reset_password.mail.ep
@@ -36,7 +36,7 @@
 
 
Someone has requested to change your password for the <%= 
$instance_name %>. If you requested this change, please click the link below 
and change your password. Otherwise, you can disregard this email.
-   Click to Reset Your 
Password
+   Click to Reset Your Password
 
Thank you,
The <%= $instance_name %> Team



[1/2] incubator-trafficcontrol-website git commit: Update docs from commit 595297a91bca13ffaa8116ce50ef3b9c9b8bf778

2017-08-23 Thread git-site-role
Repository: incubator-trafficcontrol-website
Updated Branches:
  refs/heads/asf-site a2f2179b1 -> 62e136dfc


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/62e136df/docs/master/searchindex.js
--
diff --git a/docs/master/searchindex.js b/docs/master/searchindex.js
index 43dd7ad..05cf330 100644
--- a/docs/master/searchindex.js
+++ b/docs/master/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["admin/index","admin/quick_howto/dnssec","admin/quick_howto/federations","admin/quick_howto/index","admin/quick_howto/multi_site","admin/quick_howto/multi_site_ats5","admin/quick_howto/regionalgeo","admin/quick_howto/steering","admin/traffic_monitor","admin/traffic_monitor_golang","admin/traffic_ops/configuration","admin/traffic_ops/default_profiles","admin/traffic_ops/extensions","admin/traffic_ops/installation","admin/traffic_ops/migration_from_10_to_20","admin/traffic_ops/using","admin/traffic_portal","admin/traffic_router","admin/traffic_server","admin/traffic_stats","admin/traffic_vault","basics/cache_revalidation","basics/caching_proxies","basics/content_delivery_networks","basics/http_11","basics/index","development/building","development/index","development/traffic_monitor","development/traffic_monitor/traffic_monitor_api","development/traffic_monitor_golang","development/traffic_ops","development/traffic_ops_api/routes","development/traffic_ops_ap
 
i/v11/asn","development/traffic_ops_api/v11/cachegroup","development/traffic_ops_api/v11/cdn","development/traffic_ops_api/v11/changelog","development/traffic_ops_api/v11/deliveryservice","development/traffic_ops_api/v11/hwinfo","development/traffic_ops_api/v11/parameter","development/traffic_ops_api/v11/phys_location","development/traffic_ops_api/v11/profile","development/traffic_ops_api/v11/region","development/traffic_ops_api/v11/role","development/traffic_ops_api/v11/server","development/traffic_ops_api/v11/static_dns","development/traffic_ops_api/v11/status","development/traffic_ops_api/v11/system","development/traffic_ops_api/v11/to_extension","development/traffic_ops_api/v11/type","development/traffic_ops_api/v11/user","development/traffic_ops_api/v12/api_capability","development/traffic_ops_api/v12/asn","development/traffic_ops_api/v12/cache_stats","development/traffic_ops_api/v12/cachegroup","development/traffic_ops_api/v12/cachegroup_parameter","development/traffic_ops_api
 
/v12/capability","development/traffic_ops_api/v12/cdn","development/traffic_ops_api/v12/changelog","development/traffic_ops_api/v12/configfiles_ats","development/traffic_ops_api/v12/deliveryservice","development/traffic_ops_api/v12/deliveryservice_regex","development/traffic_ops_api/v12/deliveryservice_stats","development/traffic_ops_api/v12/division","development/traffic_ops_api/v12/federation","development/traffic_ops_api/v12/hwinfo","development/traffic_ops_api/v12/influxdb","development/traffic_ops_api/v12/iso","development/traffic_ops_api/v12/job","development/traffic_ops_api/v12/parameter","development/traffic_ops_api/v12/phys_location","development/traffic_ops_api/v12/profile","development/traffic_ops_api/v12/profile_parameter","development/traffic_ops_api/v12/region","development/traffic_ops_api/v12/role","development/traffic_ops_api/v12/server","development/traffic_ops_api/v12/static_dns","development/traffic_ops_api/v12/status","development/traffic_ops_api/v12/steering_tar
 
get","development/traffic_ops_api/v12/system","development/traffic_ops_api/v12/tenant","development/traffic_ops_api/v12/to_extension","development/traffic_ops_api/v12/topology","development/traffic_ops_api/v12/type","development/traffic_ops_api/v12/user","development/traffic_portal","development/traffic_router","development/traffic_router/traffic_router_api","development/traffic_server","development/traffic_stats","faq/administration","faq/development","faq/general","faq/index","glossary","index","overview/index","overview/introduction","overview/traffic_monitor","overview/traffic_ops","overview/traffic_portal","overview/traffic_router","overview/traffic_server","overview/traffic_stats","overview/traffic_vault"],envversion:50,filenames:["admin/index.rst","admin/quick_howto/dnssec.rst","admin/quick_howto/federations.rst","admin/quick_howto/index.rst","admin/quick_howto/multi_site.rst","admin/quick_howto/multi_site_ats5.rst","admin/quick_howto/regionalgeo.rst","admin/quick_howto/steer
 

[2/2] incubator-trafficcontrol-website git commit: Update docs from commit 595297a91bca13ffaa8116ce50ef3b9c9b8bf778

2017-08-23 Thread git-site-role
Update docs from commit 595297a91bca13ffaa8116ce50ef3b9c9b8bf778


Project: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/commit/62e136df
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/tree/62e136df
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/diff/62e136df

Branch: refs/heads/asf-site
Commit: 62e136dfc0aaa38d77fd17a57d3b5c873c25a224
Parents: a2f2179
Author: jenkins 
Authored: Wed Aug 23 17:28:02 2017 +
Committer: jenkins 
Committed: Wed Aug 23 17:28:02 2017 +

--
 .../traffic_ops_api/v12/deliveryservice.rst.txt | 32 ++--
 .../traffic_ops_api/v12/deliveryservice.html| 12 
 docs/master/searchindex.js  |  2 +-
 3 files changed, 23 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/62e136df/docs/master/_sources/development/traffic_ops_api/v12/deliveryservice.rst.txt
--
diff --git 
a/docs/master/_sources/development/traffic_ops_api/v12/deliveryservice.rst.txt 
b/docs/master/_sources/development/traffic_ops_api/v12/deliveryservice.rst.txt
index b26d30e..da3e044 100644
--- 
a/docs/master/_sources/development/traffic_ops_api/v12/deliveryservice.rst.txt
+++ 
b/docs/master/_sources/development/traffic_ops_api/v12/deliveryservice.rst.txt
@@ -1630,7 +1630,7 @@ SSL Keys
   +--+-+-+
   |  Parameter   |   Type  |   Description   |
   +==+=+=+
-  | ``key``  | string  | ds_ where  is integer id of ds  |
+  | ``key``  | string  | xml_id of the delivery service  |
   +--+-+-+
   | ``version``  | string  | version of the keys being generated |
   +--+-+-+
@@ -1650,7 +1650,7 @@ SSL Keys
   **Request Example** ::
 
 {
-  "key": "ds_1",
+  "key": "ds-01",
   "businessUnit": "CDN Engineering",
   "version": "3",
   "hostname": "tr.ds-01.ott.kabletown.com",
@@ -1695,24 +1695,24 @@ SSL Keys
 
   **Request Properties**
 
-  +-++---+
-  |  Parameter  |  Type  | Description   |
-  +=++===+
-  | ``key`` | string | ds_ where  is integer id of ds|
-  +-++---+
-  | ``version`` | string | version of the keys being generated   |
-  +-++---+
-  | ``csr`` | string |   |
-  +-++---+
-  | ``crt`` | string |   |
-  +-++---+
-  | ``key`` | string |   |
-  +-++---+
+  +-++-+
+  |  Parameter  |  Type  | Description |
+  +=++=+
+  | ``key`` | string | xml_id of the delivery service  |
+  +-++-+
+  | ``version`` | string | version of the keys being generated |
+  +-++-+
+  | ``csr`` | string | |
+  +-++-+
+  | ``crt`` | string | |
+  +-++-+
+  | ``key`` | string | |
+  +-++-+
 
   **Request Example** ::
 
 {
-  "key": "ds_1",
+  "key": "ds-01",
   "version": "1",
   "certificate": {
 "key": "some_key",

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/62e136df/docs/master/development/traffic_ops_api/v12/deliveryservice.html
--
diff --git a/docs/master/development/traffic_ops_api/v12/deliveryservice.html 
b/docs/master/development/traffic_ops_api/v12/deliveryservice.html
index f758a8f..b482ece 100644
--- a/docs/master/development/traffic_ops_api/v12/deliveryservice.html

[2/2] incubator-trafficcontrol git commit: This closes #855

2017-08-23 Thread mitchell852
This closes #855


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/595297a9
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/595297a9
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/595297a9

Branch: refs/heads/master
Commit: 595297a91bca13ffaa8116ce50ef3b9c9b8bf778
Parents: 8f238f3
Author: Jeremy Mitchell 
Authored: Wed Aug 23 11:19:22 2017 -0600
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 11:19:22 2017 -0600

--

--




[1/2] incubator-trafficcontrol git commit: Fix regression issues caused by TC-187: 1. revert: replace xml_id with ds_ as riak key for ssl certificate 2. revert: decode base64 for ssl csr, crt,

2017-08-23 Thread mitchell852
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 7af61e8cb -> 595297a91


Fix regression issues caused by TC-187:
1. revert: replace xml_id with ds_ as riak key for ssl certificate
2. revert: decode base64 for ssl csr, crt, key in restful api

Add missing code for update ssl keystore when hostname changes


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/8f238f38
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/8f238f38
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/8f238f38

Branch: refs/heads/master
Commit: 8f238f3883bde6580bc8dfb4b26ba99f1e43edf4
Parents: 7af61e8
Author: Zhilin Huang 
Authored: Wed Aug 23 11:03:03 2017 +0800
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 11:18:51 2017 -0600

--
 .../traffic_ops_api/v12/deliveryservice.rst | 32 -
 .../app/lib/API/DeliveryService/SslKeys.pm  | 36 ++--
 traffic_ops/app/lib/API/Deliveryservice.pm  |  7 
 traffic_ops/app/lib/UI/DeliveryService.pm   |  3 +-
 traffic_ops/app/lib/UI/SslKeys.pm   |  9 +++--
 .../app/script/update_riak_for_search.pl|  3 ++
 .../app/t/api/1.1/deliveryservice/ssl_keys.t|  4 +--
 7 files changed, 45 insertions(+), 49 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8f238f38/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
--
diff --git a/docs/source/development/traffic_ops_api/v12/deliveryservice.rst 
b/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
index b26d30e..da3e044 100644
--- a/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
+++ b/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
@@ -1630,7 +1630,7 @@ SSL Keys
   +--+-+-+
   |  Parameter   |   Type  |   Description   |
   +==+=+=+
-  | ``key``  | string  | ds_ where  is integer id of ds  |
+  | ``key``  | string  | xml_id of the delivery service  |
   +--+-+-+
   | ``version``  | string  | version of the keys being generated |
   +--+-+-+
@@ -1650,7 +1650,7 @@ SSL Keys
   **Request Example** ::
 
 {
-  "key": "ds_1",
+  "key": "ds-01",
   "businessUnit": "CDN Engineering",
   "version": "3",
   "hostname": "tr.ds-01.ott.kabletown.com",
@@ -1695,24 +1695,24 @@ SSL Keys
 
   **Request Properties**
 
-  +-++---+
-  |  Parameter  |  Type  | Description   |
-  +=++===+
-  | ``key`` | string | ds_ where  is integer id of ds|
-  +-++---+
-  | ``version`` | string | version of the keys being generated   |
-  +-++---+
-  | ``csr`` | string |   |
-  +-++---+
-  | ``crt`` | string |   |
-  +-++---+
-  | ``key`` | string |   |
-  +-++---+
+  +-++-+
+  |  Parameter  |  Type  | Description |
+  +=++=+
+  | ``key`` | string | xml_id of the delivery service  |
+  +-++-+
+  | ``version`` | string | version of the keys being generated |
+  +-++-+
+  | ``csr`` | string | |
+  +-++-+
+  | ``crt`` | string | |
+  +-++-+
+  | ``key`` | string | |
+  +-++-+
 
   **Request Example** ::
 
 {
-  "key": "ds_1",
+  "key": "ds-01",
   "version": "1",
   "certificate": {
 "key": "some_key",


[1/2] incubator-trafficcontrol git commit: Fix SQL error in downgrade scripts

2017-08-23 Thread hbeatty
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/2.1.x b01784897 -> 87a134ac7


Fix SQL error in downgrade scripts

(cherry picked from commit 4a5962ed53720c6ff2286979a71161e782d725e7)


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/e8fe88b5
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/e8fe88b5
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/e8fe88b5

Branch: refs/heads/2.1.x
Commit: e8fe88b5c31a24231eb1746fb819d4fc1072151b
Parents: b017848
Author: Rawlin Peters 
Authored: Mon Aug 21 16:45:54 2017 -0600
Committer: hbeatty 
Committed: Wed Aug 23 13:27:27 2017 -0400

--
 .../app/db/migrations/2017081600_staticdnsentry_ds_fk.sql| 4 ++--
 .../app/db/migrations/2017081601_job_deliveryservice_fk.sql  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e8fe88b5/traffic_ops/app/db/migrations/2017081600_staticdnsentry_ds_fk.sql
--
diff --git 
a/traffic_ops/app/db/migrations/2017081600_staticdnsentry_ds_fk.sql 
b/traffic_ops/app/db/migrations/2017081600_staticdnsentry_ds_fk.sql
index 5c3bd51..b4c78c3 100644
--- a/traffic_ops/app/db/migrations/2017081600_staticdnsentry_ds_fk.sql
+++ b/traffic_ops/app/db/migrations/2017081600_staticdnsentry_ds_fk.sql
@@ -31,6 +31,6 @@ DROP CONSTRAINT fk_staticdnsentry_ds,
 ADD CONSTRAINT fk_staticdnsentry_ds
   FOREIGN KEY (deliveryservice)
   REFERENCES deliveryservice (id)
-  ON DELETE NO_ACTION
-  ON UPDATE NO_ACTION;
+  ON DELETE NO ACTION
+  ON UPDATE NO ACTION;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e8fe88b5/traffic_ops/app/db/migrations/2017081601_job_deliveryservice_fk.sql
--
diff --git 
a/traffic_ops/app/db/migrations/2017081601_job_deliveryservice_fk.sql 
b/traffic_ops/app/db/migrations/2017081601_job_deliveryservice_fk.sql
index 1a08211..7aa85e9 100644
--- a/traffic_ops/app/db/migrations/2017081601_job_deliveryservice_fk.sql
+++ b/traffic_ops/app/db/migrations/2017081601_job_deliveryservice_fk.sql
@@ -31,6 +31,6 @@ DROP CONSTRAINT fk_job_deliveryservice1,
 ADD CONSTRAINT fk_job_deliveryservice1
   FOREIGN KEY (job_deliveryservice)
   REFERENCES deliveryservice (id)
-  ON DELETE NO_ACTION
-  ON UPDATE NO_ACTION;
+  ON DELETE NO ACTION
+  ON UPDATE NO ACTION;
 



[2/2] incubator-trafficcontrol git commit: This closes #856

2017-08-23 Thread hbeatty
This closes #856


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/87a134ac
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/87a134ac
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/87a134ac

Branch: refs/heads/2.1.x
Commit: 87a134ac7b2e225ddaf14b1bcdc5fd1fea094759
Parents: e8fe88b
Author: hbeatty 
Authored: Wed Aug 23 13:28:10 2017 -0400
Committer: hbeatty 
Committed: Wed Aug 23 13:28:10 2017 -0400

--

--




[1/3] incubator-trafficcontrol git commit: updates base_url

2017-08-23 Thread mitchell852
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 5b4251466 -> 71978394f


updates base_url


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/35abdcc6
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/35abdcc6
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/35abdcc6

Branch: refs/heads/master
Commit: 35abdcc64d9dbe70a1fd118bc51538d6fa10be66
Parents: df979b1
Author: Dan Kirkwood 
Authored: Tue Aug 22 20:57:22 2017 +
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 10:37:41 2017 -0600

--
 traffic_ops/install/bin/_postinstall | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/35abdcc6/traffic_ops/install/bin/_postinstall
--
diff --git a/traffic_ops/install/bin/_postinstall 
b/traffic_ops/install/bin/_postinstall
index d0a711c..503daa2 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -234,6 +234,10 @@ sub generateCdnConf {
 $#secrets = $cdnConfiguration{keepSecrets} - 1;
 }
 }
+if (exists $cdnConfiguration{base_url}) {
+$cdnConf->{to}{base_url} = $cdnConfiguration{base_url};
+}
+
 $cdnConf = setCdnConfGoPort($cdnConf);
 $cdnConf->{hypnotoad}{workers} = $cdnConfiguration{workers};
 #InstallUtils::logger("cdnConf: " . Dumper($cdnConf), "info" );



[1/3] incubator-trafficcontrol git commit: DS URL access - removing a test probably failed on env diffs

2017-08-23 Thread mitchell852
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 86d098d72 -> 7af61e8cb


DS URL access - removing a test probably failed on env diffs


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/4b68e321
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/4b68e321
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/4b68e321

Branch: refs/heads/master
Commit: 4b68e32102e99f27f378e800a77976b486cc3bf7
Parents: a70ba7d
Author: nir-sopher 
Authored: Tue Aug 22 22:54:16 2017 +0300
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 10:59:09 2017 -0600

--
 .../app/t/api/1.1/deliveryservice/keys_url_sig.t | 19 ---
 1 file changed, 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/4b68e321/traffic_ops/app/t/api/1.1/deliveryservice/keys_url_sig.t
--
diff --git a/traffic_ops/app/t/api/1.1/deliveryservice/keys_url_sig.t 
b/traffic_ops/app/t/api/1.1/deliveryservice/keys_url_sig.t
index 12ce94d..5630d02 100644
--- a/traffic_ops/app/t/api/1.1/deliveryservice/keys_url_sig.t
+++ b/traffic_ops/app/t/api/1.1/deliveryservice/keys_url_sig.t
@@ -68,12 +68,6 @@ ok 
$t->post_ok('/api/1.1/deliveryservices/xmlId/test-ds1/urlkeys/generate')->sta
->or( sub { diag $t->tx->res->content->asset->{content}; } ),
'Can an assigned DeliveryService url keys for the portal user be 
regenerated?';
 
-set_param_value("use_tenancy", "0");
-ok 
$t->post_ok('/api/1.1/deliveryservices/xmlId/test-ds2/urlkeys/generate')->status_is(403)
-   ->or( sub { diag $t->tx->res->content->asset->{content}; } ),
-   'Can an unassigned DeliveryService url keys for the portal user be 
regenerated?';
-set_param_value("use_tenancy", "1");
-
 ok 
$t->post_ok('/api/1.1/deliveryservices/xmlId/XXX/urlkeys/generate')->status_is(400)
->json_is( "/alerts/0/text/", "Delivery Service 'XXX' does not exist." 
)->or( sub { diag $t->tx->res->content->asset->{content}; } ),
'Can a non existent DeliveryService url keys for the portal user be 
regenerated?';
@@ -189,16 +183,3 @@ ok $t->post_ok(
 # logout
 ok $t->get_ok('/logout')->status_is(302)->or( sub { diag 
$t->tx->res->content->asset->{content}; } );
 done_testing();
-
-
-sub set_param_value {
-   my $name = shift;
-   my $value = shift;
-   my $q  = "UPDATE parameter SET value=\'$value\' where name = 
\'$name\'";
-   my $get_svr = $dbh->prepare($q);
-   $get_svr->execute();
-   my $p = $get_svr->fetchall_arrayref( {} );
-   $get_svr->finish();
-   my $id = $p->[0]->{id};
-   return $id;
-}



[2/3] incubator-trafficcontrol git commit: url sig - tenancy checks

2017-08-23 Thread mitchell852
url sig - tenancy checks


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a70ba7d4
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a70ba7d4
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a70ba7d4

Branch: refs/heads/master
Commit: a70ba7d49f44ff7dbff81d38ba76913032b2916e
Parents: 86d098d
Author: nir-sopher 
Authored: Sun Aug 13 18:25:37 2017 +0300
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 10:59:09 2017 -0600

--
 .../app/lib/API/DeliveryService/KeysUrlSig.pm   | 31 --
 .../t/api/1.1/deliveryservice/keys_url_sig.t| 43 
 2 files changed, 71 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a70ba7d4/traffic_ops/app/lib/API/DeliveryService/KeysUrlSig.pm
--
diff --git a/traffic_ops/app/lib/API/DeliveryService/KeysUrlSig.pm 
b/traffic_ops/app/lib/API/DeliveryService/KeysUrlSig.pm
index 6364154..2673710 100644
--- a/traffic_ops/app/lib/API/DeliveryService/KeysUrlSig.pm
+++ b/traffic_ops/app/lib/API/DeliveryService/KeysUrlSig.pm
@@ -20,6 +20,7 @@ use Mojo::Base 'Mojolicious::Controller';
 use Data::Dumper;
 use API::Keys;
 use Utils::Helper;
+use Utils::Tenant;
 use JSON;
 use UI::Utils;
 use constant URL_SIG_KEYS_BUCKET => "url_sig_keys";
@@ -29,6 +30,17 @@ our @EXPORT_OK = qw(URL_SIG_KEYS_BUCKET);
 sub view_by_xmlid {
my $self= shift;
my $xml_id  = $self->param('xmlId');
+
+   my $rs = $self->db->resultset("Deliveryservice")->find( { xml_id => 
$xml_id } );
+   if ( !defined($rs) ) {
+   return $self->not_found("Delivery Service '$xml_id' does not 
exist.");
+   }
+   my $tenant_utils = Utils::Tenant->new($self);
+   my $tenants_data = $tenant_utils->create_tenants_data_from_db();
+   if (!$tenant_utils->is_ds_resource_accessible($tenants_data, 
$rs->tenant_id)) {
+   return $self->forbidden("Forbidden. Delivery-service tenant is 
not available to the user.");
+   }
+
my $config_file = $self->url_sig_config_file_name($xml_id);
my $response_container  = $self->riak_get( URL_SIG_KEYS_BUCKET, 
$config_file );
my $rc  = $response_container->{"response"}->{_rc};
@@ -58,6 +70,11 @@ sub copy_url_sig_keys {
else {
return $self->alert("Delivery Service '$xml_id' does not 
exist.");
}
+   my $tenant_utils = Utils::Tenant->new($self);
+   my $tenants_data = $tenant_utils->create_tenants_data_from_db();
+   if (!$tenant_utils->is_ds_resource_accessible($tenants_data, 
$rs->tenant_id)) {
+   return $self->forbidden("Forbidden. Delivery-service tenant is 
not available to the user.");
+   }
my $config_file = $self->url_sig_config_file_name($xml_id);
 
#check ds to copy from and generate config file name
@@ -69,6 +86,9 @@ sub copy_url_sig_keys {
else {
return $self->alert("Delivery Service to copy from 
'$copy_from_xml_id' does not exist.");
}
+   if (!$tenant_utils->is_ds_resource_accessible($tenants_data, 
$copy_rs->tenant_id)) {
+   return $self->forbidden("Forbidden. Source delivery-service 
tenant is not available to the user.");
+   }
my $copy_config_file = 
$self->url_sig_config_file_name($copy_from_xml_id);
 
my $helper = new Utils::Helper( { mojo => $self } );
@@ -76,7 +96,7 @@ sub copy_url_sig_keys {
 
#verify we can copy keys out
if ( $helper->is_valid_delivery_service($copy_ds_id) ) {
-   if ( $is_admin || 
$helper->is_delivery_service_assigned($copy_ds_id) ) {
+   if ( $is_admin || 
$helper->is_delivery_service_assigned($copy_ds_id) || 
$tenant_utils->use_tenancy()) {
my $response_container = $self->riak_get( 
URL_SIG_KEYS_BUCKET, $copy_config_file ); # verify this
my $rc = 
$response_container->{"response"}->{_rc};
if ( $rc eq '200' ) {
@@ -98,7 +118,7 @@ sub copy_url_sig_keys {
if ( defined($url_sig_key_values_json) ) { # verify we got keys copied
# Admins can always do this, otherwise verify the user
if ( $helper->is_valid_delivery_service($ds_id) ) {
-   if ( $is_admin || 
$helper->is_delivery_service_assigned($ds_id) ) {
+   if ( $is_admin || 
$helper->is_delivery_service_assigned($ds_id) || $tenant_utils->use_tenancy()) {
$self->app->log->debug( 
"url_sig_key_values_json #-> " . 

[3/3] incubator-trafficcontrol git commit: This closes #831

2017-08-23 Thread mitchell852
This closes #831


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/7af61e8c
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/7af61e8c
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/7af61e8c

Branch: refs/heads/master
Commit: 7af61e8cb8c3cff8c603fa34c74e161bbaed5564
Parents: 4b68e32
Author: Jeremy Mitchell 
Authored: Wed Aug 23 10:59:43 2017 -0600
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 10:59:43 2017 -0600

--

--




[1/2] incubator-trafficcontrol git commit: refactored how tokin login works to ensure tokin login is complete before attempting to resolve other dependencies that need the authentication cookie

2017-08-23 Thread dangogh
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 71978394f -> 86d098d72


refactored how tokin login works to ensure tokin login is complete before 
attempting to resolve other dependencies that need the authentication cookie


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/98092836
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/98092836
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/98092836

Branch: refs/heads/master
Commit: 98092836c2ae5ac3382245e1b3645eefbda1c7b6
Parents: 7197839
Author: Jeremy Mitchell 
Authored: Wed Aug 23 10:33:36 2017 -0600
Committer: Dan Kirkwood 
Committed: Wed Aug 23 10:43:40 2017 -0600

--
 .../app/src/common/api/AuthService.js   | 15 +++-
 .../app/src/common/api/UserService.js   | 37 +++-
 .../src/modules/private/PrivateController.js| 27 ++
 traffic_portal/app/src/modules/private/index.js | 12 +--
 4 files changed, 64 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/98092836/traffic_portal/app/src/common/api/AuthService.js
--
diff --git a/traffic_portal/app/src/common/api/AuthService.js 
b/traffic_portal/app/src/common/api/AuthService.js
index 4fff7e4..463a99b 100644
--- a/traffic_portal/app/src/common/api/AuthService.js
+++ b/traffic_portal/app/src/common/api/AuthService.js
@@ -40,8 +40,21 @@ var AuthService = function($rootScope, $http, $state, 
$location, $q, $state, htt
 };
 
 this.tokenLogin = function(token) {
+var deferred = $q.defer();
+
 userModel.resetUser();
-return httpService.post(ENV.api['root'] + 'user/login/token', { t: 
token });
+
+$http.post(ENV.api['root'] + "user/login/token", { t: token })
+.then(
+function() {
+deferred.resolve();
+},
+function() {
+deferred.reject();
+}
+);
+
+return deferred.promise;
 };
 
 this.logout = function() {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/98092836/traffic_portal/app/src/common/api/UserService.js
--
diff --git a/traffic_portal/app/src/common/api/UserService.js 
b/traffic_portal/app/src/common/api/UserService.js
index 1a51934..6d45f96 100644
--- a/traffic_portal/app/src/common/api/UserService.js
+++ b/traffic_portal/app/src/common/api/UserService.js
@@ -22,31 +22,20 @@ var UserService = function(Restangular, $http, $location, 
$q, authService, httpS
 var service = this;
 
 this.getCurrentUser = function() {
-var token = $location.search().token,
-deferred = $q.defer();
-
-if (angular.isDefined(token)) {
-$location.search('token', null); // remove the token query param
-authService.tokenLogin(token)
-.then(
-function(response) {
-service.getCurrentUser();
-}
-);
-} else {
-$http.get(ENV.api['root'] + "user/current")
-.then(
-function(result) {
-userModel.setUser(result.data.response);
-deferred.resolve(result.data.response);
-},
-function(fault) {
-deferred.reject(fault);
-}
-);
+var deferred = $q.defer();
 
-return deferred.promise;
-}
+$http.get(ENV.api['root'] + "user/current")
+.then(
+function(result) {
+userModel.setUser(result.data.response);
+deferred.resolve(result.data.response);
+},
+function(fault) {
+deferred.reject(fault);
+}
+);
+
+return deferred.promise;
 };
 
 this.resetPassword = function(email) {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/98092836/traffic_portal/app/src/modules/private/PrivateController.js
--
diff --git a/traffic_portal/app/src/modules/private/PrivateController.js 
b/traffic_portal/app/src/modules/private/PrivateController.js
new file mode 100644
index 000..9b815dc
--- /dev/null
+++ b/traffic_portal/app/src/modules/private/PrivateController.js
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) 

[2/2] incubator-trafficcontrol git commit: This closes #857.

2017-08-23 Thread dangogh
This closes #857.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/86d098d7
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/86d098d7
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/86d098d7

Branch: refs/heads/master
Commit: 86d098d72e6db727d5fadc4ef2c6f8eebd051fbd
Parents: 9809283
Author: Dan Kirkwood 
Authored: Wed Aug 23 10:44:55 2017 -0600
Committer: Dan Kirkwood 
Committed: Wed Aug 23 10:44:55 2017 -0600

--

--




[1/2] incubator-trafficcontrol git commit: This closes #852

2017-08-23 Thread dewrich
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master fafd81186 -> 5b4251466


This closes #852


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5b425146
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5b425146
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5b425146

Branch: refs/heads/master
Commit: 5b4251466e519d8c1d59306ec2be647da3579626
Parents: 5c88de8
Author: Dewayne Richardson 
Authored: Wed Aug 23 10:30:46 2017 -0600
Committer: Dewayne Richardson 
Committed: Wed Aug 23 10:30:46 2017 -0600

--

--




[2/3] incubator-trafficcontrol git commit: required keys in ldap.conf; check host form; add base_url to defaults and q's

2017-08-23 Thread mitchell852
required keys in ldap.conf; check host form; add base_url to defaults and q's


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/df979b16
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/df979b16
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/df979b16

Branch: refs/heads/master
Commit: df979b164af2575159cd339036200a72215c63c2
Parents: 5b42514
Author: Dan Kirkwood 
Authored: Fri Aug 18 12:44:33 2017 -0600
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 10:37:41 2017 -0600

--
 traffic_ops/install/bin/_postinstall | 29 ++---
 1 file changed, 26 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/df979b16/traffic_ops/install/bin/_postinstall
--
diff --git a/traffic_ops/install/bin/_postinstall 
b/traffic_ops/install/bin/_postinstall
index 4659142..d0a711c 100755
--- a/traffic_ops/install/bin/_postinstall
+++ b/traffic_ops/install/bin/_postinstall
@@ -263,6 +263,25 @@ sub generateLdapConf {
 }
 
 my %ldapConf = getConfig( $userInput, $fileName );
+# convert any deprecated keys to the correct key name
+my %keys_converted = ( password => 'admin_pw', hostname => 'host' );
+for my $key (keys %ldapConf) {
+if ( exists $keys_converted{$key} ) {
+$ldapConf{ $keys_converted{$key} } = delete $ldapConf{$key};
+}
+}
+
+my @requiredKeys = qw{ host admin_dn admin_pw search_base };
+for my $k (@requiredKeys) {
+if (! exists $ldapConf{$k} ) {
+errorOut("$k is a required key in $fileName");
+}
+}
+
+# do a very loose check of form -- 'host' must be hostname:port
+if ( $ldapConf{ host } !~ /^\S+:\d+$/ ) {
+errorOut("host in $fileName must be of form 'hostname:port'");
+}
 
 make_path( dirname($fileName), { mode => 0755 } );
 InstallUtils::writeJson( $fileName, \%ldapConf );
@@ -450,7 +469,11 @@ sub getDefaults {
 {
 "Number of workers?" => "96",
 "config_var" => "workers"
-}
+},
+{
+"Traffic Ops url?"   => "http://localhost:3000;,
+"config_var" => "base_url"
+},
 ],
 $ldapConfFile => [
 {
@@ -459,7 +482,7 @@ sub getDefaults {
 },
 {
 "LDAP server hostname" => "",
-"config_var"   => "hostname"
+"config_var"   => "host"
 },
 {
 "LDAP Admin DN" => "",
@@ -467,7 +490,7 @@ sub getDefaults {
 },
 {
 "LDAP Admin Password" => "",
-"config_var"  => "password",
+"config_var"  => "admin_pw",
 "hidden"  => "true"
 },
 {



[1/2] incubator-trafficcontrol git commit: refactored how tokin login works to ensure tokin login is complete before attempting to resolve other dependencies that need the authentication cookie

2017-08-23 Thread hbeatty
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/2.1.x 87a134ac7 -> b89909fd1


refactored how tokin login works to ensure tokin login is complete before 
attempting to resolve other dependencies that need the authentication cookie

(cherry picked from commit 98092836c2ae5ac3382245e1b3645eefbda1c7b6)


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/6688e321
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/6688e321
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/6688e321

Branch: refs/heads/2.1.x
Commit: 6688e321264c1a3e78f7932a322693b379c9c394
Parents: 87a134a
Author: Jeremy Mitchell 
Authored: Wed Aug 23 10:33:36 2017 -0600
Committer: hbeatty 
Committed: Wed Aug 23 14:23:14 2017 -0400

--
 .../app/src/common/api/AuthService.js   | 15 +++-
 .../app/src/common/api/UserService.js   | 37 +++-
 .../src/modules/private/PrivateController.js| 27 ++
 traffic_portal/app/src/modules/private/index.js | 12 +--
 4 files changed, 64 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6688e321/traffic_portal/app/src/common/api/AuthService.js
--
diff --git a/traffic_portal/app/src/common/api/AuthService.js 
b/traffic_portal/app/src/common/api/AuthService.js
index 4fff7e4..463a99b 100644
--- a/traffic_portal/app/src/common/api/AuthService.js
+++ b/traffic_portal/app/src/common/api/AuthService.js
@@ -40,8 +40,21 @@ var AuthService = function($rootScope, $http, $state, 
$location, $q, $state, htt
 };
 
 this.tokenLogin = function(token) {
+var deferred = $q.defer();
+
 userModel.resetUser();
-return httpService.post(ENV.api['root'] + 'user/login/token', { t: 
token });
+
+$http.post(ENV.api['root'] + "user/login/token", { t: token })
+.then(
+function() {
+deferred.resolve();
+},
+function() {
+deferred.reject();
+}
+);
+
+return deferred.promise;
 };
 
 this.logout = function() {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6688e321/traffic_portal/app/src/common/api/UserService.js
--
diff --git a/traffic_portal/app/src/common/api/UserService.js 
b/traffic_portal/app/src/common/api/UserService.js
index 1a51934..6d45f96 100644
--- a/traffic_portal/app/src/common/api/UserService.js
+++ b/traffic_portal/app/src/common/api/UserService.js
@@ -22,31 +22,20 @@ var UserService = function(Restangular, $http, $location, 
$q, authService, httpS
 var service = this;
 
 this.getCurrentUser = function() {
-var token = $location.search().token,
-deferred = $q.defer();
-
-if (angular.isDefined(token)) {
-$location.search('token', null); // remove the token query param
-authService.tokenLogin(token)
-.then(
-function(response) {
-service.getCurrentUser();
-}
-);
-} else {
-$http.get(ENV.api['root'] + "user/current")
-.then(
-function(result) {
-userModel.setUser(result.data.response);
-deferred.resolve(result.data.response);
-},
-function(fault) {
-deferred.reject(fault);
-}
-);
+var deferred = $q.defer();
 
-return deferred.promise;
-}
+$http.get(ENV.api['root'] + "user/current")
+.then(
+function(result) {
+userModel.setUser(result.data.response);
+deferred.resolve(result.data.response);
+},
+function(fault) {
+deferred.reject(fault);
+}
+);
+
+return deferred.promise;
 };
 
 this.resetPassword = function(email) {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6688e321/traffic_portal/app/src/modules/private/PrivateController.js
--
diff --git a/traffic_portal/app/src/modules/private/PrivateController.js 
b/traffic_portal/app/src/modules/private/PrivateController.js
new file mode 100644
index 000..9b815dc
--- /dev/null
+++ 

[2/2] incubator-trafficcontrol git commit: This closes #858

2017-08-23 Thread hbeatty
This closes #858


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/b89909fd
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/b89909fd
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/b89909fd

Branch: refs/heads/2.1.x
Commit: b89909fd1ed0e1e3a75b9ba0f996c12857f47367
Parents: 6688e32
Author: hbeatty 
Authored: Wed Aug 23 14:24:46 2017 -0400
Committer: hbeatty 
Committed: Wed Aug 23 14:24:46 2017 -0400

--

--




[2/2] incubator-trafficcontrol git commit: Add TO Go wrapper to return auth data

2017-08-23 Thread dewrich
Add TO Go wrapper to return auth data


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5c88de87
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5c88de87
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5c88de87

Branch: refs/heads/master
Commit: 5c88de87e62041b7ed7ac0a30edcd5969d39cbb8
Parents: fafd811
Author: Robert Butts 
Authored: Tue Aug 22 13:50:45 2017 -0600
Committer: Dewayne Richardson 
Committed: Wed Aug 23 10:30:46 2017 -0600

--
 traffic_ops/traffic_ops_golang/auth.go | 10 ++
 traffic_ops/traffic_ops_golang/wrappers.go | 19 ---
 2 files changed, 22 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5c88de87/traffic_ops/traffic_ops_golang/auth.go
--
diff --git a/traffic_ops/traffic_ops_golang/auth.go 
b/traffic_ops/traffic_ops_golang/auth.go
index 5205b3f..9a33a84 100644
--- a/traffic_ops/traffic_ops_golang/auth.go
+++ b/traffic_ops/traffic_ops_golang/auth.go
@@ -25,6 +25,7 @@ import (

"github.com/apache/incubator-trafficcontrol/traffic_monitor_golang/common/log"
 )
 
+const PrivLevelInvalid = -1
 const PrivLevelReadOnly = 10
 const PrivLevelOperations = 20
 const PrivLevelAdmin = 30
@@ -33,17 +34,18 @@ func preparePrivLevelStmt(db *sql.DB) (*sql.Stmt, error) {
return db.Prepare("select r.priv_level from tm_user as u join role as r 
on u.role = r.id where u.username = $1")
 }
 
-func hasPrivLevel(privLevelStmt *sql.Stmt, user string, level int) bool {
+// privLevel returns the privilege level of the given user, or 
PrivLevelInvalid if the user doesn't exist.
+func PrivLevel(privLevelStmt *sql.Stmt, user string) int {
var privLevel int
err := privLevelStmt.QueryRow(user).Scan()
switch {
case err == sql.ErrNoRows:
log.Errorf("checking user %v priv level: user not in database", 
user)
-   return false
+   return PrivLevelInvalid
case err != nil:
log.Errorf("Error checking user %v priv level: %v", user, 
err.Error())
-   return false
+   return PrivLevelInvalid
default:
-   return privLevel >= level
+   return privLevel
}
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5c88de87/traffic_ops/traffic_ops_golang/wrappers.go
--
diff --git a/traffic_ops/traffic_ops_golang/wrappers.go 
b/traffic_ops/traffic_ops_golang/wrappers.go
index d21017f..283406e 100644
--- a/traffic_ops/traffic_ops_golang/wrappers.go
+++ b/traffic_ops/traffic_ops_golang/wrappers.go
@@ -47,9 +47,21 @@ func wrapHeaders(h RegexHandlerFunc) RegexHandlerFunc {
}
 }
 
+type AuthRegexHandlerFunc func(w http.ResponseWriter, r *http.Request, params 
ParamMap, user string, privLevel int)
+
+func handlerToAuthHandler(h RegexHandlerFunc) AuthRegexHandlerFunc {
+   return func(w http.ResponseWriter, r *http.Request, p ParamMap, user 
string, privLevel int) { h(w, r, p) }
+}
+
 func wrapAuth(h RegexHandlerFunc, noAuth bool, secret string, privLevelStmt 
*sql.Stmt, privLevelRequired int) RegexHandlerFunc {
+   return wrapAuthWithData(handlerToAuthHandler(h), noAuth, secret, 
privLevelStmt, privLevelRequired)
+}
+
+func wrapAuthWithData(h AuthRegexHandlerFunc, noAuth bool, secret string, 
privLevelStmt *sql.Stmt, privLevelRequired int) RegexHandlerFunc {
if noAuth {
-   return h
+   return func(w http.ResponseWriter, r *http.Request, p ParamMap) 
{
+   h(w, r, p, "", PrivLevelInvalid)
+   }
}
return func(w http.ResponseWriter, r *http.Request, p ParamMap) {
// TODO remove, and make username available to wrapLogTime
@@ -86,7 +98,8 @@ func wrapAuth(h RegexHandlerFunc, noAuth bool, secret string, 
privLevelStmt *sql
}
 
username = oldCookie.AuthData
-   if !hasPrivLevel(privLevelStmt, username, privLevelRequired) {
+   privLevel := PrivLevel(privLevelStmt, username)
+   if privLevel < privLevelRequired {
handleUnauthorized("insufficient privileges")
return
}
@@ -94,7 +107,7 @@ func wrapAuth(h RegexHandlerFunc, noAuth bool, secret 
string, privLevelStmt *sql
newCookieVal := tocookie.Refresh(oldCookie, secret)
http.SetCookie(w, {Name: tocookie.Name, Value: 
newCookieVal, Path: "/", HttpOnly: true})
 
-   h(w, r, p)
+   

[1/2] incubator-trafficcontrol-website git commit: Update docs from commit 9c2545da1dfca5f1d8b6f2e1b011ea8b922da641

2017-08-23 Thread git-site-role
Repository: incubator-trafficcontrol-website
Updated Branches:
  refs/heads/asf-site 62e136dfc -> 1b70a8376


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/1b70a837/docs/master/searchindex.js
--
diff --git a/docs/master/searchindex.js b/docs/master/searchindex.js
index 05cf330..3a0491f 100644
--- a/docs/master/searchindex.js
+++ b/docs/master/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["admin/index","admin/quick_howto/dnssec","admin/quick_howto/federations","admin/quick_howto/index","admin/quick_howto/multi_site","admin/quick_howto/multi_site_ats5","admin/quick_howto/regionalgeo","admin/quick_howto/steering","admin/traffic_monitor","admin/traffic_monitor_golang","admin/traffic_ops/configuration","admin/traffic_ops/default_profiles","admin/traffic_ops/extensions","admin/traffic_ops/installation","admin/traffic_ops/migration_from_10_to_20","admin/traffic_ops/using","admin/traffic_portal","admin/traffic_router","admin/traffic_server","admin/traffic_stats","admin/traffic_vault","basics/cache_revalidation","basics/caching_proxies","basics/content_delivery_networks","basics/http_11","basics/index","development/building","development/index","development/traffic_monitor","development/traffic_monitor/traffic_monitor_api","development/traffic_monitor_golang","development/traffic_ops","development/traffic_ops_api/routes","development/traffic_ops_ap
 
i/v11/asn","development/traffic_ops_api/v11/cachegroup","development/traffic_ops_api/v11/cdn","development/traffic_ops_api/v11/changelog","development/traffic_ops_api/v11/deliveryservice","development/traffic_ops_api/v11/hwinfo","development/traffic_ops_api/v11/parameter","development/traffic_ops_api/v11/phys_location","development/traffic_ops_api/v11/profile","development/traffic_ops_api/v11/region","development/traffic_ops_api/v11/role","development/traffic_ops_api/v11/server","development/traffic_ops_api/v11/static_dns","development/traffic_ops_api/v11/status","development/traffic_ops_api/v11/system","development/traffic_ops_api/v11/to_extension","development/traffic_ops_api/v11/type","development/traffic_ops_api/v11/user","development/traffic_ops_api/v12/api_capability","development/traffic_ops_api/v12/asn","development/traffic_ops_api/v12/cache_stats","development/traffic_ops_api/v12/cachegroup","development/traffic_ops_api/v12/cachegroup_parameter","development/traffic_ops_api
 
/v12/capability","development/traffic_ops_api/v12/cdn","development/traffic_ops_api/v12/changelog","development/traffic_ops_api/v12/configfiles_ats","development/traffic_ops_api/v12/deliveryservice","development/traffic_ops_api/v12/deliveryservice_regex","development/traffic_ops_api/v12/deliveryservice_stats","development/traffic_ops_api/v12/division","development/traffic_ops_api/v12/federation","development/traffic_ops_api/v12/hwinfo","development/traffic_ops_api/v12/influxdb","development/traffic_ops_api/v12/iso","development/traffic_ops_api/v12/job","development/traffic_ops_api/v12/parameter","development/traffic_ops_api/v12/phys_location","development/traffic_ops_api/v12/profile","development/traffic_ops_api/v12/profile_parameter","development/traffic_ops_api/v12/region","development/traffic_ops_api/v12/role","development/traffic_ops_api/v12/server","development/traffic_ops_api/v12/static_dns","development/traffic_ops_api/v12/status","development/traffic_ops_api/v12/steering_tar
 
get","development/traffic_ops_api/v12/system","development/traffic_ops_api/v12/tenant","development/traffic_ops_api/v12/to_extension","development/traffic_ops_api/v12/topology","development/traffic_ops_api/v12/type","development/traffic_ops_api/v12/user","development/traffic_portal","development/traffic_router","development/traffic_router/traffic_router_api","development/traffic_server","development/traffic_stats","faq/administration","faq/development","faq/general","faq/index","glossary","index","overview/index","overview/introduction","overview/traffic_monitor","overview/traffic_ops","overview/traffic_portal","overview/traffic_router","overview/traffic_server","overview/traffic_stats","overview/traffic_vault"],envversion:50,filenames:["admin/index.rst","admin/quick_howto/dnssec.rst","admin/quick_howto/federations.rst","admin/quick_howto/index.rst","admin/quick_howto/multi_site.rst","admin/quick_howto/multi_site_ats5.rst","admin/quick_howto/regionalgeo.rst","admin/quick_howto/steer
 

[2/2] incubator-trafficcontrol-website git commit: Update docs from commit 9c2545da1dfca5f1d8b6f2e1b011ea8b922da641

2017-08-23 Thread git-site-role
Update docs from commit 9c2545da1dfca5f1d8b6f2e1b011ea8b922da641


Project: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/commit/1b70a837
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/tree/1b70a837
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/diff/1b70a837

Branch: refs/heads/asf-site
Commit: 1b70a8376d08b45127b5b28bfb21a1ebd36deb7f
Parents: 62e136d
Author: jenkins 
Authored: Wed Aug 23 21:48:39 2017 +
Committer: jenkins 
Committed: Wed Aug 23 21:48:39 2017 +

--
 .../traffic_ops_api/v12/parameter.rst.txt   | 10 
 .../traffic_ops_api/v12/parameter.html  | 24 
 docs/master/searchindex.js  |  2 +-
 3 files changed, 35 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/1b70a837/docs/master/_sources/development/traffic_ops_api/v12/parameter.rst.txt
--
diff --git 
a/docs/master/_sources/development/traffic_ops_api/v12/parameter.rst.txt 
b/docs/master/_sources/development/traffic_ops_api/v12/parameter.rst.txt
index 1ee6d24..52eede9 100644
--- a/docs/master/_sources/development/traffic_ops_api/v12/parameter.rst.txt
+++ b/docs/master/_sources/development/traffic_ops_api/v12/parameter.rst.txt
@@ -29,6 +29,16 @@ Parameter
 
   Role(s) Required: None
 
+  **Request Query Parameters**
+
+  
+-+--+---+
+  | Name| Required | Description   
|
+  
+=+==+===+
+  | ``name``| no   | Filter parameters by name.
|
+  
+-+--+---+
+  | ``configFile``  | no   | Filter parameters by config file. 
|
+  
+-+--+---+
+
   **Response Properties**
 
   
+--+-++

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/1b70a837/docs/master/development/traffic_ops_api/v12/parameter.html
--
diff --git a/docs/master/development/traffic_ops_api/v12/parameter.html 
b/docs/master/development/traffic_ops_api/v12/parameter.html
index 3f54e2d..3a662e6 100644
--- a/docs/master/development/traffic_ops_api/v12/parameter.html
+++ b/docs/master/development/traffic_ops_api/v12/parameter.html
@@ -204,6 +204,30 @@
 
 Authentication Required: Yes
 Role(s) Required: None
+Request Query Parameters
+
+
+
+
+
+
+
+Name
+Required
+Description
+
+
+
+name
+no
+Filter parameters by name.
+
+configFile
+no
+Filter parameters by config file.
+
+
+
 Response Properties
 
 



[2/2] incubator-trafficcontrol git commit: This closes #863

2017-08-23 Thread dangogh
This closes #863


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/8256caf5
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/8256caf5
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/8256caf5

Branch: refs/heads/master
Commit: 8256caf53a5ce3bf81b82834c35562aa6b164316
Parents: 91d436f
Author: Dan Kirkwood 
Authored: Wed Aug 23 14:26:48 2017 -0600
Committer: Dan Kirkwood 
Committed: Wed Aug 23 14:26:48 2017 -0600

--

--




[1/2] incubator-trafficcontrol git commit: hides ds/user assign if use_tenancy is turned on

2017-08-23 Thread dangogh
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 8256caf53 -> 9c2545da1


hides ds/user assign if use_tenancy is turned on


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a0276cb4
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a0276cb4
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a0276cb4

Branch: refs/heads/master
Commit: a0276cb4f46ee0334644539115035db93c20f069
Parents: 8256caf
Author: Jeremy Mitchell 
Authored: Wed Aug 23 14:42:06 2017 -0600
Committer: Dan Kirkwood 
Committed: Wed Aug 23 14:46:28 2017 -0600

--
 .../TableUserDeliveryServicesController.js | 6 --
 .../userDeliveryServices/table.userDeliveryServices.tpl.html   | 6 +++---
 .../src/modules/private/admin/users/deliveryServices/index.js  | 3 +++
 3 files changed, 10 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0276cb4/traffic_portal/app/src/common/modules/table/userDeliveryServices/TableUserDeliveryServicesController.js
--
diff --git 
a/traffic_portal/app/src/common/modules/table/userDeliveryServices/TableUserDeliveryServicesController.js
 
b/traffic_portal/app/src/common/modules/table/userDeliveryServices/TableUserDeliveryServicesController.js
index 69ab8bf..a88cd3d 100644
--- 
a/traffic_portal/app/src/common/modules/table/userDeliveryServices/TableUserDeliveryServicesController.js
+++ 
b/traffic_portal/app/src/common/modules/table/userDeliveryServices/TableUserDeliveryServicesController.js
@@ -17,12 +17,14 @@
  * under the License.
  */
 
-var TableUserDeliveryServicesController = function(user, userDeliveryServices, 
$scope, $state, $uibModal, locationUtils, userService) {
+var TableUserDeliveryServicesController = function(user, userDeliveryServices, 
useTenancy, $scope, $state, $uibModal, locationUtils, userService) {
 
$scope.user = user;
 
$scope.userDeliveryServices = userDeliveryServices;
 
+   $scope.useTenancy = useTenancy[0].value;
+
$scope.removeDS = function(dsId) {
userService.deleteUserDeliveryService(user.id, dsId)
.then(
@@ -78,5 +80,5 @@ var TableUserDeliveryServicesController = function(user, 
userDeliveryServices, $
 
 };
 
-TableUserDeliveryServicesController.$inject = ['user', 'userDeliveryServices', 
'$scope', '$state', '$uibModal', 'locationUtils', 'userService'];
+TableUserDeliveryServicesController.$inject = ['user', 'userDeliveryServices', 
'useTenancy', '$scope', '$state', '$uibModal', 'locationUtils', 'userService'];
 module.exports = TableUserDeliveryServicesController;

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0276cb4/traffic_portal/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html
--
diff --git 
a/traffic_portal/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html
 
b/traffic_portal/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html
index 5540231..8980fd7 100644
--- 
a/traffic_portal/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html
+++ 
b/traffic_portal/app/src/common/modules/table/userDeliveryServices/table.userDeliveryServices.tpl.html
@@ -25,7 +25,7 @@ under the License.
 Delivery Services
 
 
-
+
 
 
 
@@ -39,7 +39,7 @@ under the License.
 xmlId
 orgServerFqdn
 cdn
-
+
 
 
 
@@ -48,7 +48,7 @@ under the License.
 {{::deliveryService.xmlId}}
 {{::deliveryService.orgServerFqdn}}
 {{::deliveryService.cdnName}}
-
+
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a0276cb4/traffic_portal/app/src/modules/private/admin/users/deliveryServices/index.js
--
diff --git 
a/traffic_portal/app/src/modules/private/admin/users/deliveryServices/index.js 
b/traffic_portal/app/src/modules/private/admin/users/deliveryServices/index.js
index 7412911..1a5fd5e 100644
--- 
a/traffic_portal/app/src/modules/private/admin/users/deliveryServices/index.js
+++ 
b/traffic_portal/app/src/modules/private/admin/users/deliveryServices/index.js
@@ -32,6 +32,9 @@ module.exports = 

[2/2] incubator-trafficcontrol git commit: This closes #864

2017-08-23 Thread dangogh
This closes #864


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/9c2545da
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/9c2545da
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/9c2545da

Branch: refs/heads/master
Commit: 9c2545da1dfca5f1d8b6f2e1b011ea8b922da641
Parents: a0276cb
Author: Dan Kirkwood 
Authored: Wed Aug 23 14:46:42 2017 -0600
Committer: Dan Kirkwood 
Committed: Wed Aug 23 14:46:42 2017 -0600

--

--




[2/2] incubator-trafficcontrol git commit: This closes #861

2017-08-23 Thread mitchell852
This closes #861


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/0f3c7926
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/0f3c7926
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/0f3c7926

Branch: refs/heads/master
Commit: 0f3c79265b0940215e299504d9ad14cca00f18e8
Parents: 3737bb1
Author: Jeremy Mitchell 
Authored: Wed Aug 23 13:31:37 2017 -0600
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 13:31:37 2017 -0600

--

--




[1/2] incubator-trafficcontrol git commit: adds perl-Crypt-ScryptKDF to traffic_ops rpm deps so postinstall will run

2017-08-23 Thread mitchell852
Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master 595297a91 -> 0f3c79265


adds perl-Crypt-ScryptKDF to traffic_ops rpm deps so postinstall will run


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/3737bb14
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/3737bb14
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/3737bb14

Branch: refs/heads/master
Commit: 3737bb1429cfadea51ef6f28a6098eb08c29a8df
Parents: 595297a
Author: Dan Kirkwood 
Authored: Wed Aug 23 12:14:35 2017 -0600
Committer: Jeremy Mitchell 
Committed: Wed Aug 23 13:31:11 2017 -0600

--
 traffic_ops/build/traffic_ops.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3737bb14/traffic_ops/build/traffic_ops.spec
--
diff --git a/traffic_ops/build/traffic_ops.spec 
b/traffic_ops/build/traffic_ops.spec
index f723490..a3d0153 100644
--- a/traffic_ops/build/traffic_ops.spec
+++ b/traffic_ops/build/traffic_ops.spec
@@ -36,7 +36,7 @@ Requires: cpanminus, expat-devel, gcc-c++, libcurl, 
libpcap-devel, mkiso
 Requires: openssl-devel, perl, perl-core, perl-DBD-Pg, perl-DBI, 
perl-Digest-SHA1
 Requires: libidn-devel, libcurl-devel, libcap
 Requires: postgresql96 >= 9.6.2 , postgresql96-devel >= 9.6.2
-Requires: perl-JSON, perl-libwww-perl, perl-Test-CPAN-Meta, 
perl-WWW-Curl, perl-TermReadKey
+Requires: perl-JSON, perl-libwww-perl, perl-Test-CPAN-Meta, 
perl-WWW-Curl, perl-TermReadKey, perl-Crypt-ScryptKDF
 Requires(pre):/usr/sbin/useradd, /usr/bin/getent
 Requires(postun): /usr/sbin/userdel