# Epic OP-1858 - Basic auth for APIv3

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-1858

## Detailed specification

### Motivation and background information

### Acceptance criteria

### Out of scope

| Attribute | Value |
| --- | --- |
| Mockups |  |

## Planning

| Attribute | Value |
| --- | --- |
| Roadmap |  |
| Date | 2015-05-05 – 2015-05-08 |
| Votes |  |
| List |  |
| Target versions | 4.2.0 |
| Sprint |  |
| Backlog bucket |  |
| Relevance |  |

## Subitems

_No work packages_

## Bugs and other work packages

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Enterprise plan |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Markus Kahl |
| Accountable | Markus Kahl |
| Product manager |  |
| Feature Lead |  |
| Designer |  |
| Developers |  |
| Requested by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |

## Description

**As** an OpenProject.com user  
**I want** to authenticate against OpenProject API v3 using basic auth  
**so that** I can securely access my resources.

**Acceptance criteria**

  - basic auth for API v3
  - solution that allows to add (or replace) authentication methods (e.g. access token) beyond basic auth
  - scope: limited to API v3 (not OpenProject in general) for now

**Technical Solution Concept**

  - OpenProject::Authentication API
      - add/remove/replace authentication methods (from core and plugins)
      - support for scopes (web, API v2, API v3, danger zone)
  - separate authentication from authorization
  - authorization based on authenticated user object (use existing OpenProject authorization)
      - needs to be extended to support user-independent authorization (e.g. privileges in access tokens, system user like used by reeve, zacero, other non-user based api clients)
  - Implement two gems for:
      - global basic auth (service admin access, configured through configuration.yml - for com apps)
      - user basic auth (using user credentials - for users, add-ins, etc.)
  - add gems to core dependencies (Gemfile)

**Out of scope**

  - warden for core authentication (session, rss, atom, API v2)
