Commit 9b4b9f4
Permission Model + Image Builder (#2325)
* implemented a file system permission cleaner and hooked it up in each web api function to enforce it
* auto infer group name from path
* modify ssh
* fix to test on gamma
* Implement SSH key management and Unix user/group system
- Add SshKey model with validation and fingerprinting
- Implement UnixGroupManager service for user/group management
- Create Unix users/groups automatically on course/staff creation
- Add SSH key provisioning to authorized_keys
- Implement FilesystemEnforcer with group-based permissions
- Add SSH key management UI (restricted to staff/instructors)
- Fix require paths for services in controllers
- Add services directory to autoload paths
- Create bootstrap script for existing courses
- Add host system user setup scripts
- Support BusyBox useradd (use -p '*' instead of --disabled-password)
- Add comprehensive setup and testing scripts
* testing
* add a new daemon container
* fix bugs
* fix bugs ++
* add hint for ssh key creation
* add symlink
* testing ec2, add support on autolab side
* Filesystem mapping + EC2 autograder changes
* fix group
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* add support for EC2 settings in Autolab
* fix issue with autograder initialization
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* fix groupa
* editing ssh commands
* added service user to classes
* attempt to fix course permissions
* unix file system scanner
* install assessment
* Revert "install assessment"
This reverts commit 224f4ee.
* Revert "unix file system scanner"
This reverts commit 73326f8.
* Revert "attempt to fix course permissions"
This reverts commit 18d9fa4.
* make user9999 always an instructor
* test adding user9999 to all groups
* remove integration bundle
* fix user groups
* remove check of local membership
* fix script to have both local and group
* tranfer ownership script
* CAs should not be able to ssh
* Add clarification about course unix group inclusions.
* modify ssh commands
* add provision and deprovision of keys
* prevent group add error
* fix typo in ssh commands
* fixed ca and instructor ssh perms
* sponsors and contact us page
* try to add both app and user9999
* list dir to unix ops
* fix unix ops delegation
* change delegate parsing
* mkdir over to unixops
* formatting
* should delegate during perm error
* restrict dump yaml
* yaml read file delegate to unix ops
* is file delagated to unix ops
* dump yaml to delegate
* conversion of pathname
* load config to delegate
* guard against empty file read from delegate
* try reload config file with fallback
* handin directory exists delegate
* bulk email and delegation of read writeup
* delegate submission to unix ops
* unable to read files and submit files
* Submission unviewable
* check if use_access_key exists
* basic controller done, before tango integration
* test modified symlink
* try test modified symlink fix
* update permissions when ssh key changes/user role changes
* add cleanup step for symlinks
* try fix symlink
* add log statement to debug
* modify unix_ops_daemon
* test file transfer change
* undo prev changes
* try new change
* revert changes
* test new change
* try new fix
* try new fix
* try new fix
* fix circular dependency
* try to fix for all except admin
* remove user's directory once it has no courses
* handle cleanup for deleted users
* reverse unix group deletion
* change symbolic link ownership
* try to fix cd update issue
* try to fix cd update issue
* fix circular looping
* try to fix circular looping
* fix file access
* undo file access changes
* creating container image works
* table UI almost done
* refresh status implemented
* make rails DB source of truth
* refresh all status when reloading the page/ added refresh all button
* access key
* attempt to fix file perms
* instance type guards
* fixed migrations
* logs get updated
* format error
* create parents if it does not exist
* course creation delegate
* rb sys delegate
* list dir paths to delegate
* fallback to list_dir for path exists
* fix for view submission
* fix view for submissions controller
* delegate reading to unix
* more archive read paths to be delagted
* fix file manager
* delete feedback and path access fallbacks
* delegate delete and move to unix ops
* add delete and move path to unix ops
* only show ssh part if instructor
* try modifying users list breadcrumb
* modify "Users List" view to look the same as when it has a link
* modify symlinks to handle admin properly
* can view log now
* additional details for uploading job
* fallback for tango upload
* allow for non empty feedback without autograder
* autograding works with ec2docker now!
* manage autograder images on manage course
* debugging for autograding feedback
* delegated write of feedback to unix ops
* view feedback delegate
* add description clarification
* more unix ops delegation and documentation
* fix autograder upload errors
* debugging for saving autograder
* autograder length increased
* delegate list assessment dirs
* upload uses delegate
* disallow duplicate keys across all users
* distinguish between duplicates for current user and copies from other users
* Filter out non-ready container images in autograder settings and add … (#2322)
Filter out non-ready container images in autograder settings and add dockerfile_contents column
* remove ssh access for user once account deleted (keep unix account on system)
* revert change
* added admin container images controller + routes
* add logic to wipe ssh access once account deleted
* added template for managing images
* added template for viewing build log
* added template for new image page
* try to prevent unix account creation for tas
* created admin pages
* new image form works now
* can manage images with correct permissions now
* public images have unique names
* add public_template_id to container_images
* can select public templates now
* admin controller names don't overlap anymore
* admin controller names don't overlap anymore, routes
* passes base docker image tag and uri to tango
* building image works without public template now
* authorized false by default
* only show container images that belong to the course
* gemfile dockerfile update
* added button to the manage public templates page
* Fixed polling issue with ECR builder (#2323)
* export delegate
* order images in newly created order
* add unique unix_user column to users table
* fixed public_template.image_uri
* attempt to fix non-unique ssh login issue
* instructors can choose public images now
* fixed bug with join
* push unix_user database migration file
* load dir to tar to delegate
* lint fix
* course directory name
* change ruby version
* clean up lint issues
* clean up lint issues
* changed production.rb template to add ec2_docker
* added helper text to new docker image form
* increase client max body in nginx
* remove name index
* debugging for admin ssh key
* added prefix to unix group
* remove t2 nano
---------
Co-authored-by: Haoyu Yang <haoyuy@andrew.cmu.edu>
Co-authored-by: Joey Wildman <josephwildman88@gmail.com>
Co-authored-by: Kester <kestertan040@gmail.com>
Co-authored-by: Joy Song <joys@andrew.cmu.edu>
Co-authored-by: Giancarlo Umberto Ambrosino <129298577+Giabbi@users.noreply.github.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-84-53.ec2.internal>1 parent e098031 commit 9b4b9f4
92 files changed
Lines changed: 7378 additions & 762 deletions
File tree
- app
- assets
- javascripts
- stylesheets
- controllers
- admin
- api/v1
- assessment
- helpers
- models
- services
- views
- admin/container_images
- assessments
- autograders
- container_images
- courses
- home
- layouts
- users
- config
- environments
- db
- migrate
- docker
- docs
- lib
- script
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
| 551 | + | |
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
26 | | - | |
27 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
28 | 37 | | |
29 | 38 | | |
30 | 39 | | |
| |||
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
41 | | - | |
| 50 | + | |
42 | 51 | | |
43 | 52 | | |
44 | 53 | | |
| |||
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
56 | | - | |
| 65 | + | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| |||
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
79 | | - | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
83 | | - | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
| |||
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
109 | 118 | | |
110 | 119 | | |
111 | 120 | | |
| |||
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
133 | | - | |
134 | | - | |
| 142 | + | |
135 | 143 | | |
136 | 144 | | |
137 | 145 | | |
| |||
219 | 227 | | |
220 | 228 | | |
221 | 229 | | |
222 | | - | |
| 230 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
0 commit comments