codeskyblue / codeskyblue/gohttpserver

Error when authorizing through configuration file config.yml

Open
#216 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.8k
Forks
583
PR merge metrics
No merged PRs in 30d

Description

There are problems when the Gohtttserver application is running through the configuration file: [testdata/config.yml](https://github.com/codeskyblue/gohttpserver/blob/df32f57005d9f02ee08a89f237a711316b992376/testdata/config.yml). When you launch the app
`$ gohttpserver --conf=config.yml`
using only the config.yml configuration file:
```
---
# Configuration Go HTTP Server
# [Link](https://github.com/codeskyblue/gohttpserver )
#
root: ./dir
port: 1234
auth-type: http
auth-http: username1:password1
```
Then the application is allowed on the site without any authorization.
When you specify the same parameters via the command line, the application requires authorization.
`$ gohttpserver --conf=config.yml --auth-type http --auth-http username1:password1`
This has been verified with basic authorization, OpenID, OAuth2.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing how testdata/config.yml is parsed with how the --auth-type and --auth-http command-line options are applied. Run gohttpserver --conf=config.yml and the equivalent command-line invocation, then verify that configuration-file authentication is enforced for basic authorization and the other reported authorization modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.