44 Commits (654ff124fba56d18823ef36bd2976749fb7ba8d0)

Author SHA1 Message Date
Kirill Sizov 7b86ed814e
Use 'ParseError' instead of 'BadRequest' (#5625)
When we use `BadRequest` our responses doesn't contain error message, so
it's better to use exceptions from `rest_framework.exceptions`
3 years ago
Roman Donchenko 14bb0b74af
Fix a CI issue that causes unit tests to run against the wrong version of CVAT (#5612)
There seems to be a bug somewhere in the Docker ecosystem (it's probably
either Docker Compose, Docker Buildx or BuildKit) that causes `docker
compose build` to ignore base images that are already present in the
system, and instead fetch them from Docker Hub, if there's a custom
Buildx builder configured. There's a bug report here:
<https://github.com/docker/compose/issues/9939>.

This bug means that when the build pipeline builds the `cvat_ci` image,
it's based on the latest release of `cvat/server` from Docker Hub
instead of the version that we just built. Consequently, we run the unit
tests against that release instead of the development version.

Fortunately, we don't actually need to set up a Buildx builder in most
jobs (including the `unit_testing` job), so just don't do that.

Also, use `cvat/server:local` as the base image in `Dockerfile.ci`. This
will prevent a similar bug from reoccurring in the future, since the
`local` tag should never be uploaded to Docker Hub.
3 years ago
ddx-day 0f0913c138
Django social account sso (#5059)
Issue: https://github.com/opencv/cvat/issues/1217

Currently there are a few proposals for SSO authentication to bypass the
current user/password login on the UI. By using Django social accounts
it is also possible to use SSO on the API, retrieving the security token
by passing the code from the OAuth2 workflow. This is an example using
Amazon Cognito, but any other social account could also be added.

### Motivation and context
Currently CVAT has no functionality to log in with SSO. Other current
proposals bypass the current Django framework to add SSO in the UI only,
but still use username and password for the API. Using Django social
accounts integrates SSO with the API as well, allowing it to be used as
an alternative to the username and password, but can also be used
together with other SSO frameworks that are UI only.

### How has this been tested?
Unit tests for SSO manager in cvat-core and integration test with
cvat-sdk for /auth/cognito endpoint.

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable by a reason then ~~explicitly
strikethrough~~ the whole
line. If you don't do that github will show an incorrect process for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- [ ] I have added a description of my changes into
[CHANGELOG](https://github.com/cvat-ai/cvat/blob/develop/CHANGELOG.md)
file
- [x] I have updated the [documentation](
https://github.com/cvat-ai/cvat/blob/develop/README.md#documentation)
accordingly
- [x] I have added tests to cover my changes
- [x] I have linked related issues ([read github docs](

https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- [ ] I have increased versions of npm packages if it is necessary
([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),
[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and
[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.

Co-authored-by: Melanie Day <mday@EYEDIAGNOSIS.local>
Co-authored-by: Maria Khrustaleva <maria@cvat.ai>
Co-authored-by: Nikita Manovich <nikita@cvat.ai>
3 years ago
Maria Khrustaleva b00bc653ff
Social account authentication tests (#5444)
Depends on #5349
Related #5432
Added tests for social account authentication functionality: cypress
test with dummy auth server
3 years ago
Kirill Sizov 71a0aaf2bb
Improve error messages when limits reached (#5556) 3 years ago
Maxim Zhiltsov ec3e1f34a4
Better reporting for user limits (#5225)
- Added explanatory messages for actions denied for user limits
- Fixed few rules and checks
- Upgraded OPA version
3 years ago
Andrey Zhavoronkov 1ecc607286
Get preview images on the fly and keep them in cache (#5478)
Improved image preview loading for **Tasks**, **Jobs** and **Projects**
views
Backend behaviour change: creating image previews by request and storing
them in the cache
Added corresponding endpoints:
tasks/{id}/preview
projects/{id}/preview
jobs/{id}/preview

Demonstration(added random 0-1s delay for demo purposes):
https://user-images.githubusercontent.com/41117609/208106321-951b8647-6e6b-452e-910c-31c4d0b8682d.mp4
https://user-images.githubusercontent.com/41117609/208106339-2d3a5a7b-d422-4b27-9e76-08729022e1ca.mp4
3 years ago
Maria Khrustaleva a3b4f97f9a
Improve social authentication (#5349) 3 years ago
Maxim Zhiltsov 4e97c243d6
Refactor OPA tests (#5373)
- OPA tests are now autogenerated
- Updated invocation docs
3 years ago
Maxim Zhiltsov cacb99735f
Add job access checks for model invocations (#5392)
Fixes #4996
- Added job access checks for model launches in the interactive mode
3 years ago
Roman Donchenko 192fd72680
Fix creation of tasks with Git repositories via the SDK (#5409)
Fixes #4365
3 years ago
Kirill Sizov 25503a35d2
Fix export job (#5282) 3 years ago
Maria Khrustaleva bb487165dd
CVAT authentication (#5147) 3 years ago
Andrey Zhavoronkov 49bdef01f1
IAM OPA bundle for dev environment (#5190) 3 years ago
Boris Sekachev 43e22c2cce
Updated rego rules, job assignee can resolve an issue (#5167) 3 years ago
Andrey Zhavoronkov 9cf2989546
Init OPA rules with API instead of file binding (#5047) 3 years ago
Andrey Zhavoronkov 570bc3880f
Added user_registered signal (#5007) 3 years ago
Kirill Lakhov b7371ede35
Enabled authentication via email (#5037) 3 years ago
Kirill Sizov bae7564968
Add webhooks (#4863)
Co-authored-by: “klakhov” <kirill.lakhov@cvat.ai>
Co-authored-by: Boris <sekachev.bs@gmail.com>
Co-authored-by: kirill-sizov <kirill.sizov@intel.com>
3 years ago
Maxim Zhiltsov 68375ec23e
Add SDK docs (#4928)
- Added auth docs in API schema and SDK ApiClient/Config (fixes #1517)
- Added SDK docs with API, SDK and CLI docs
- Added `develop` branch in the docs
- Allowed unauthorized access to `api/docs`, `api/swagger`, `api/schema` endpoints
- Added `--insecure` env var to control host checks in CLI
- Refactored `build_docs.py` (backported https://github.com/openvinotoolkit/datumaro/pull/589)
- Extracted requirements file for site
3 years ago
Andrey Zhavoronkov 02a2965e04
Fixed reset password after switching to dj-rest-auth (#52) 4 years ago
Maxim Zhiltsov 7b2fc54e20
Add CVAT SDK package (#7) 4 years ago
Boris Sekachev 4f1a778d22
Fixed Intel license headers (#119) 4 years ago
Maxim Zhiltsov bddd44642d
Fix pylint issues (#100) 4 years ago
Maria Khrustaleva 54c15830a9
Add support for source & target storages (#28) 4 years ago
Boris Sekachev f960da9117
Added ability to delete frames (#10)
Co-authored-by: Dmitry Kalinin <dmitry.kalinin@intel.com>
Co-authored-by: Nikita Manovich <nikita.manovich@gmail.com>
Co-authored-by: Boris Sekachev <b.sekachev@yandex.ru>
4 years ago
Kirill Lakhov cb896ecab2
Tus for backups (#9) 4 years ago
Kiwon Jung 449ae0c5bf
fixed: Unable to upload annotations #4459 (#4513) 4 years ago
Kirill Lakhov bceae228a7
Tus for project dataset (#4485) 4 years ago
Maria Khrustaleva be334fdee9
Update REST API documentation (#4391) 4 years ago
Kiwon Jung c69f10b4cb
fixed: job assignee can remove or update any issue created by the task owner #4424 (#4436) 4 years ago
Kiwon Jung 42fdea9466
fixed: Permission error occured when accessing the JobCommits #4434 (#4435) 4 years ago
Kiwon Jung e62d200fe5
fixed: Permission error occured when accessing the comments of a specific issue - #4416 (#4421) 4 years ago
Nikita Manovich cc98ff0584
Fix OPTIONS request to REST API methods (#4402) 4 years ago
Nikita Manovich df8590e747
Refactor permissions.py from IAM app (#4336) 4 years ago
bseres99 a676862556
Fix stage and state modification permission (#4324)
Co-authored-by: Matyesz12 <turi.mate12@gmail.com>
4 years ago
Andrey Zhavoronkov ae50696892
Fixed reset password functionality (#4343) 4 years ago
Maria Khrustaleva d098e42c45
Migration to drf_spectacular (#4210) 4 years ago
Maria Khrustaleva 83126c7b5a
API versioning using accept header (#4239) 4 years ago
Andrey Zhavoronkov 976e40393b
Kibana public/private access using IAM (#4240)
* removed djago_reproxy dependency

* fix

* added visibility option, added tests

* updated changelog

* fixed comments

* added rule for admin into .csv, regenerate analytics_test.gen.rego

Co-authored-by: Nikita Manovich <nikita.manovich@intel.com>
4 years ago
Nikita Manovich 5ccc596888
Filtering for sandbox (#4216)
* Implemented visibility for org= as { 'organization': None }

Now we have 3 types of visibility (aka org_filter)
1. org=slug - see objects only for the organization
2. org=     - see objects only for sandbox (organzation is None)
3. None     - see all objects which you can access
4 years ago
Nikita Manovich 5e59ba1791
Fix project permissons (anybody in org could see the list of projects) (#4201) 4 years ago
G Karthik Raja 566eb2aaa5
Fix Bug 4010 - API method to register does not return authentification token (#4092)
* Return auth token key on register without email verification

When email verification is turned off using all-auth settings, then on registration, return the auth token key.

* Add tests for user registration without email verification

* Add test case for user registration when email confirmation is manadatory

* Refactor register api tests and add its docstring

* updated the license header for iam tests

* Add pull request link to changelog

* Add comment to explain overriding of ROOT_URLConf

* Refactor tests for user registration

Split the test case for user registration without email verification into two test cases by overriding ACCOUNT_EMAIL_VERIFICATION
as 'none' and 'optional'

* Fix doc string

* updated changelog

Co-authored-by: karthik <gkraja@mindkosh.com>
Co-authored-by: Andrey Zhavoronkov <andrey.zhavoronkov@intel.com>
4 years ago
Nikita Manovich 4708b5ecf8
IAM: Open Policy Agent integration (#3788)
Co-authored-by: Boris Sekachev <boris.sekachev@intel.com>
Co-authored-by: Dmitry Kruchinin <dmitryx.kruchinin@intel.com>
4 years ago