Commit Graph

13 Commits

Author SHA1 Message Date
Cody Cutrer 809904d8b6 add frozen_string_literal comment to migrations
Change-Id: Idf4ddb29567c1dfab9f01b09c7a1056367ae7b44
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261814
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2021-03-30 18:14:36 +00:00
Simon Williams 9535bee361 squash old migrations, p30
Change-Id: Ic70fd33a97c388cf4e1a1dfd6ad26c023f5f3040
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236782
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-06-06 03:44:59 +00:00
Simon Williams a72e6cd4fd squash old migrations, p29
Change-Id: I14eb45f796dfdf102f37b1aeb9ad664ab593465b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-06-06 02:55:12 +00:00
Simon Williams 2348f8525c squash old migrations, p27 (through 2015)
Change-Id: I861eb26bb73e59dd489578b2f66ae26b08679287
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234270
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-05-18 14:26:26 +00:00
Simon Williams 91883f9063 squash old migrations, p18
Change-Id: I9421b33d2708b03b25538984d2583e9476c820ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226126
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-04-21 14:42:17 +00:00
Simon Williams 03bfeb8e6a squash old migrations, p17 (through 2013)
Change-Id: I5c9eb5bfd405dc8956ee1756080ec19d5b67a6fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226125
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-03-04 21:40:28 +00:00
Simon Williams d45a35951d squash old migrations, p16
Change-Id: I78da2371145e3744b9570d8781f353d7b3185778
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227060
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-03-04 21:40:22 +00:00
Simon Williams 77ad3be446 Revert "squash old migrations, p16"
This reverts commit ec90fe1357.

the validation check might fail, because it uses a cassandra commit

Change-Id: Ia8be0df1d7de5716f6ec376589af1532b9d84a18
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227042
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-02-18 19:46:35 +00:00
Simon Williams ec90fe1357 squash old migrations, p16
Change-Id: I9523e13ce28670cdaee40a511153bc0d17f7eeb4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/226124
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-02-18 18:54:21 +00:00
Landon Wilkins 58e4df2494 da licença part 37
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: Ibc881431ca51b7da3b0d3182033e95ebf7d6e524
Reviewed-on: https://gerrit.instructure.com/110067
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 22:44:36 +00:00
Cody Cutrer 884534ffa5 Rails 5: fix Rails version migration deprecation warning
also pins all migrations to Rails 4.2 semantics

Change-Id: I386566f7a1f3e3e8aa31675f467c87c443457aee
Reviewed-on: https://gerrit.instructure.com/95571
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-11-17 23:46:22 +00:00
Cody Cutrer 7458f6af24 cassandra 1.2/2.0 compatibility
refs CNVS-7877

 * counter updates have to be in their own batch in 1.2+
 * add the use_cql3? method to cassandra gem, even
   though we're not updating it yet
 * slight change in syntax for table creation
 * 1.2 doesn't return schema info in the schema cql command;
   use a query to get tables

Change-Id: I22642b0fb99e744080f9a7efd0b3d0372de020b9
Reviewed-on: https://gerrit.instructure.com/25361
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-10-23 20:23:51 +00:00
Jacob Fugal 59737086e7 Auditors::Authentication
fixes CNVS-390

stores and allows querying by user/account/pseudonym of login/logout
events.

test-plan:
  [setup]
    - set up an 'auditors' keyspace in cassandra and run migrations
    - have shardX and shardY on one database server, and shardZ on a
      different database server
    - have accountW and accountX on shardX
    - have accountY and accountZ on shardY and shardZ, respectively
    - have userA on shardX with pseudonymAW in accountW and pseudonymAX in
      accountX (cross-account, single-shard user)
    - have userB on shardY with pseudonymBY in accountY and pseudonymBX in
      accountX (cross-shard user)
    - have userC on shardZ with pseudonymCZ in accountZ and pseudonymCX in
      accountX (cross-db-server user)
    - log in and out of each pseudonym above multiple times

  [index isolation]
    - /api/v1/audit/authentication/pseudonyms/<pseudonymAX> should
      include logins and logouts from pseudonymAX only
    - /api/v1/audit/authentication/accounts/<accountX> should include
      logins and logouts from pseudonymAX, pseudonymBX, and pseudonymCX
      but not pseudonymAW
    - /api/v1/audit/authentication/users/<userA> should include logins
      and logouts from both pseudonymAW and pseudonymAX but not
      pseudonymBX or pseudonymCX

  [permission isolation]
    (in each of these, either :view_statistics or :manage_user_logins on
    an account qualifies as "having permission")
    - /api/v1/audit/authentication/pseudonyms/<pseudonymAX> should be
      unauthorized if the current user doesn't have permission on
      accountX
    - /api/v1/audit/authentication/accounts/<accountX> should be
      unauthorized if the current user doesn't have permission on
      accountX
    - /api/v1/audit/authentication/users/<userA> should be unauthorized
      if the current user doesn't have permission on either of accountW
      or accountX
    - /api/v1/audit/authentication/users/<userA> should include logins
      and logouts from accountW but not from accountX if the current
      user has permission on accountW but not on accountX

  [sharding]
    - /api/v1/audit/authentication/users/<userB> should include logins
      and logouts from both pseudonymBY and pseudonymBX
    - /api/v1/audit/authentication/users/<userB> should not include
      duplicate logins and logouts from either pseudonymBY and
      pseudonymBX (potential for bug due to both pseudonyms' shards
      being on the same database server)
    - /api/v1/audit/authentication/users/<userC> should include logins
      and logouts from both pseudonymCZ and pseudonymCX

Change-Id: I74b1573b346935f733fe5b07919d2d450cf07592
Reviewed-on: https://gerrit.instructure.com/21829
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2013-07-12 16:10:33 +00:00