Go to file
zees-dev 69c17986d9
feat(api-key/backend): introducing support for api-key based auth EE-978 (#6079)
* feat(access-token): Multi-auth middleware support EE-1891 (#5936)

* AnyAuth middleware initial implementation with tests

* using mux.MiddlewareFunc instead of custom definition

* removed redundant comments

* - ExtractBearerToken bouncer func made private
- changed helm token handling functionality to use jwt service to convert token to jwt string
- updated tests
- fixed helm list broken test due to missing token in request context

* rename mwCheckAuthentication -> mwCheckJWTAuthentication

* - introduce initial api-key auth support using X-API-KEY header
- added tests to validate x-api-key request header presence

* updated core mwAuthenticatedUser middleware to support multiple auth paradigms

* - simplified anyAuth middleware
- enforcing authmiddleware to implement verificationFunc interface
- created tests for middleware

* simplify bouncer

Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com>

* feat(api-key): user-access-token generation endpoint EE-1889 EE-1888 EE-1895 (#6012)

* user-access-token generation endpoint

* fix comment

* - introduction of apikey service
- seperation of repository from service logic - called in handler

* fixed tests

* - fixed api key prefix
- added tests

* added another test for digest matching

* updated swagger spec for access token creation

* api key response returns raw key and struct - easing testability

* test for api key prefix length

* added another TODO to middleware

* - api-key prefix rune -> string (rune does not auto-encode when response sent back to client)
- digest -> pointer as we want to allow nil values and omit digest in responses (when nil)

* - updated apikey struct
- updated apikey service to support all common operations
- updated apikey repo
- integration of apikey service into bouncer
- added test for all apikey service functions
- boilerplate code for apikey service integration

* - user access token generation tests
- apiKeyLookup updated to support query params
- added api-key tests for query params
- added api-key tests for apiKeyLookup

* get and remove access token handlers

* get and remove access token handler tests

* - delete user deletes all associated api keys
- tests for this functionality

* removed redundant []byte cast

* automatic api-key eviction set within cache for 1 hour

* fixed bug with loop var using final value

* fixed service comment

* ignore bolt error responses

* case-insensitive query param check

* simplified query var assignment

* - added GetAPIKey func to get by unique id
- updated DeleteAPIKey func to not require user ID
- updated tests

* GenerateRandomKey helper func from github.com/gorilla/securecookie moved to codebase

* json response casing for api-keys fixed

* updating api-key will update the cache

* updated golang LRU cache

* using hashicorps golang-LRU cache for api keys

* simplified jwt check in create user access token

* fixed api-key update logic on cache miss

* Prefix generated api-keys with `ptr_` (#6067)

* prefix api-keys with 'ptr_'

* updated apikey description

* refactor

Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com>

* helm list test refactor

* fixed user delete test

* reduce test nil pointer errors

* using correct http 201 created status code for token creation; updated tests

* fixed swagger doc user id path param for user access token based endpoints

* added api-key security openapi spec to existing jwt secured endpoints (#6091)

* fixed flaky test

* apikey datecreated and lastused attrs converted to unix timestamp

* feat(user): added access token datatable. (#6124)

* feat(user): added access token datatable.

* feat(tokens): only display lastUsed time when it is not the default date

* Update app/portainer/views/account/accountController.js

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* Update app/portainer/views/account/accountController.js

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* Update app/portainer/views/account/accountController.js

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* Update app/portainer/components/datatables/access-tokens-datatable/accessTokensDatatableController.js

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* Update app/portainer/services/api/userService.js

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* feat(improvements): proposed datatable improvements to speed up dev time (#6138)

* modal code update

* updated datatable filenames, updated controller to be default class export

* fix(access-token): code improvement.

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* feat(apikeys): create access token view initial implementation EE-1886 (#6129)

* CopyButton implementation

* Code component implementation

* ToolTip component migration to another folder

* TextTip component implementation - continued

* form Heading component

* Button component updated to be more dynamic

* copybutton - small size

* form control pass tip error

* texttip small text

* CreateAccessToken react feature initial implementation

* create user access token angularjs view implementation

* registration of CreateAccessToken component in AngularJS

* user token generation API request moved to angular service, method passed down instead

* consistent naming of access token operations; clustered similar code together

* any user can add access token

* create access token page routing

* moved code component to the correct location

* removed isadmin check as all functionality applicable to all users

* create access token angular view moved up a level

* fixed PR issues, updated PR

* addressed PR issues/improvements

* explicit hr for horizontal line

* fixed merge conflict storybook build breaking

* - apikey test
- cache test

* addressed testing issues:
- description validations
- remove token description link on table

* fix(api-keys): user role change evicts user keys in cache EE-2113 (#6168)

* user role change evicts user api keys in cache

* EvictUserKeyCache -> InvalidateUserKeyCache

* godoc for InvalidateUserKeyCache func

* additional test line

* disable add access token button after adding token to prevent spam

Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com>
Co-authored-by: fhanportainer <79428273+fhanportainer@users.noreply.github.com>
2021-11-30 15:31:16 +13:00
.github feat(openapi): github workflow to generate and validate openapi spec EE-2056 (#6101) 2021-11-19 09:44:08 +13:00
.storybook feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
.vscode.example feat(api-key/backend): introducing support for api-key based auth EE-978 (#6079) 2021-11-30 15:31:16 +13:00
api feat(api-key/backend): introducing support for api-key based auth EE-978 (#6079) 2021-11-30 15:31:16 +13:00
app feat(api-key/backend): introducing support for api-key based auth EE-978 (#6079) 2021-11-30 15:31:16 +13:00
build chore(build): allow darwin binaries download [EE-2070] (#6120) 2021-11-24 11:05:59 -03:00
distribution chore(version): bump version number 2020-08-27 17:48:02 +12:00
plop-templates chore(plop): use templates as in style guide (#4916) 2021-03-19 09:03:26 +13:00
test - setting port 9443 as primary (#5610) 2021-09-14 09:46:59 +12:00
webpack feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
.codeclimate.yml feat(kubernetes): introduce kubernetes support (#3987) 2020-07-06 11:21:03 +12:00
.dockerignore chore(codefresh): add codefresh.yml (#887) 2017-05-25 11:08:26 +02:00
.eslintignore refactor(app): introduce webpack and babel (#2407) 2019-03-21 18:46:49 +13:00
.eslintrc.yml feat(app): introduce button selector component [EE-2004] (#6112) 2021-11-21 11:39:26 +02:00
.gitignore feature(kubeconfig): access to all kube environment contexts from within the Portainer UI [EE-1727] (#5966) 2021-11-22 15:05:09 -03:00
.godir refactor(global): rename uifd to portainer 2016-09-04 14:50:37 +12:00
.prettierignore feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
.prettierrc feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
ATTRIBUTIONS.md Link to attributions 2021-03-22 15:35:26 +13:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md (#946) 2017-06-22 05:11:40 +02:00
CONTRIBUTING.md feat(api-key/backend): introducing support for api-key based auth EE-978 (#6079) 2021-11-30 15:31:16 +13:00
LICENSE chore(license): update license info so that GitHub recognizes it (#1924) 2018-05-23 14:47:43 +02:00
README.md update help link in sidebar and readme (#6082) 2021-11-18 10:57:17 +13:00
babel.config.js feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
build.sh chore(build): update build script and add grunt yarn script (#2276) 2018-09-16 10:34:46 +08:00
docker-compose.pull-dog.yml feat(build-system): update pull-dog configuration (#4532) 2020-12-02 08:27:30 +13:00
extensions.json feat(extensions): update offline manifest 2019-12-03 09:50:10 +13:00
gruntfile.js chore(build): allow darwin binaries download [EE-2070] (#6120) 2021-11-24 11:05:59 -03:00
jest.config.js feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
jsconfig.json feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
lint-staged.config.js feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
package.json feat(app): Slider component [EE-2004] (#6024) 2021-11-21 12:49:18 +02:00
plopfile.js chore(plop): use templates as in style guide (#4916) 2021-03-19 09:03:26 +13:00
postcss.config.js fix(wizard): align wizard grid (#5752) 2021-09-30 15:54:15 +13:00
pull-dog.json chore(ci/pull-dog): update pulldog configuration 2020-07-21 08:27:53 +12:00
tool-versions.json docs(versions): add new tool-versions json file (#5741) 2021-10-20 12:56:51 +13:00
tsconfig.json feat(app): introduce react configurations [EE-1809] (#5953) 2021-11-03 12:41:59 +02:00
webpack.config.js refactor(app): introduce webpack and babel (#2407) 2019-03-21 18:46:49 +13:00
yarn.lock feat(app): introduce input list component [EE-2003] (#6123) 2021-11-22 18:13:40 +02:00

README.md

Portainer Community Edition is a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments. It is designed to be as simple to deploy as it is to use. The application allows you to manage all your orchestrator resources (containers, images, volumes, networks and more) through a smart GUI and/or an extensive API.

Portainer consists of a single container that can run on any cluster. It can be deployed as a Linux container or a Windows native container.

Portainer Business Edition builds on the open-source base and includes a range of advanced features and functions (like RBAC and Support) that are specific to the needs of business users.

Demo

You can try out the public demo instance: http://demo.portainer.io/ (login with the username admin and the password tryportainer).

Please note that the public demo cluster is reset every 15min.

Latest Version

Portainer CE is updated regularly. We aim to do an update release every couple of months.

The latest version of Portainer is 2.9.x. Portainer is on version 2, the second number denotes the month of release.

Getting started

Features & Functions

View this table to see all of the Portainer CE functionality and compare to Portainer Business.

Getting help

Portainer CE is an open source project and is supported by the community. You can buy a supported version of Portainer at portainer.io

Learn more about Portainers community support channels here.

You can join the Portainer Community by visiting community.portainer.io. This will give you advance notice of events, content and other related Portainer content.

Reporting bugs and contributing

  • Want to report a bug or request a feature? Please open an issue.
  • Want to help us build portainer? Follow our contribution guidelines to build it locally and make a pull request.

Security

Work for us

If you are a developer, and our code in this repo makes sense to you, we would love to hear from you. We are always on the hunt for awesome devs, either freelance or employed. Drop us a line to info@portainer.io with your details and/or visit our careers page.

Privacy

To make sure we focus our development effort in the right places we need to know which features get used most often. To give us this information we use Matomo Analytics, which is hosted in Germany and is fully GDPR compliant.

When Portainer first starts, you are given the option to DISABLE analytics. If you don't choose to disable it, we collect anonymous usage as per our privacy policy. Please note, there is no personally identifiable information sent or stored at any time and we only use the data to help us improve Portainer.

Limitations

Portainer supports "Current - 2 docker versions only. Prior versions may operate, however these are not supported.

Licensing

Portainer is licensed under the zlib license. See LICENSE for reference.

Portainer also contains code from open source projects. See ATTRIBUTIONS.md for a list.