{"id":18830141,"url":"https://github.com/gravitee-io/gravitee-policy-basic-authentication","last_synced_at":"2025-04-14T03:41:40.453Z","repository":{"id":22729761,"uuid":"97163765","full_name":"gravitee-io/gravitee-policy-basic-authentication","owner":"gravitee-io","description":"Gravitee.io - Policy - Basic Authentication","archived":false,"fork":false,"pushed_at":"2025-03-28T18:10:27.000Z","size":80,"stargazers_count":1,"open_issues_count":7,"forks_count":5,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-03-28T19:25:27.314Z","etag":null,"topics":["product-apim","security-scan"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gravitee-io.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-13T20:49:15.000Z","updated_at":"2025-02-07T08:11:06.000Z","dependencies_parsed_at":"2024-02-04T17:28:30.114Z","dependency_job_id":"9e322ecf-599e-4a78-a5cd-0e5e9efac7c2","html_url":"https://github.com/gravitee-io/gravitee-policy-basic-authentication","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-policy-basic-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-policy-basic-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-policy-basic-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-policy-basic-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gravitee-io","download_url":"https://codeload.github.com/gravitee-io/gravitee-policy-basic-authentication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248818576,"owners_count":21166438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["product-apim","security-scan"],"created_at":"2024-11-08T01:47:57.133Z","updated_at":"2025-04-14T03:41:40.428Z","avatar_url":"https://github.com/gravitee-io.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Basic authentication policy\n\nifdef::env-github[]\nimage:https://img.shields.io/static/v1?label=Available%20at\u0026message=Gravitee.io\u0026color=1EC9D2[\"Gravitee.io\", link=\"https://download.gravitee.io/#graviteeio-apim/plugins/policies/gravitee-policy-basic-authentication/\"]\nimage:https://img.shields.io/badge/License-Apache%202.0-blue.svg[\"License\", link=\"https://github.com/gravitee-io/gravitee-policy-basic-authentication/blob/master/LICENSE.txt\"]\nimage:https://img.shields.io/badge/semantic--release-conventional%20commits-e10079?logo=semantic-release[\"Releases\", link=\"https://github.com/gravitee-io/gravitee-policy-basic-authentication/releases\"]\nimage:https://circleci.com/gh/gravitee-io/gravitee-policy-basic-authentication.svg?style=svg[\"CircleCI\", link=\"https://circleci.com/gh/gravitee-io/gravitee-policy-basic-authentication\"]\nendif::[]\n\n== Phase\n\n[cols=\"2*\", options=\"header\"]\n|===\n^|onRequest\n^|onResponse\n\n^.^| X\n^.^|\n\n|===\n\n== Description\n\nYou can use the `basic-authentication` policy to manage basic authentication headers sent in API calls. The policy compares the user and password sent in the basic authentication header to an APIM user to determine if the user credentials are valid.\n\nTo use the policy in an API, you need to:\n\n* configure an LDAP, inline or http resource for your API plan, which specifies where the APIM users are stored\n* configure a basic authentication policy for the API flows\n\nNOTE: LDAP, inline and http resources are not part of the default APIM configuration, so you must configure an LDAP, inline or http resource for APIM first, as described in the link:/apim/3.x/apim_devguide_plugins.html[Developer Guide^].\n\n== Compatibility with APIM\n\n|===\n| Plugin version | APIM version\n\n| 1.4.x and upper             | 3.15.x to latest\n| Up to 1.x                   | Up to 3.14.x\n|===\n\n=== Connected user\n\nAfter successful authentication, connected username is stored in context attributes, accessible with `context.attributes['user']` expression language.\n\nIn order to display the connected username in API logging, you can enable the environment setting `Gateway \u003e API logging \u003e Display end user on API Logging`.\n\nThis adds a `user` column in the logs table.\n\n== Configuration\n\nThe policy configuration is as follows:\n\n|===\n|Property |Description |Type\n\n|authenticationProviders||List of strings\n|realm||string\n|===\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravitee-io%2Fgravitee-policy-basic-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgravitee-io%2Fgravitee-policy-basic-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravitee-io%2Fgravitee-policy-basic-authentication/lists"}