Auth resource return an error when retrieving invalid auth resources ID
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start at internal/authresource/service.go:242, then trace how internal/authresource/handler.go:126 handles the invalid authorization resource. Reproduce the request with an authorization ID that does not belong to the consent, and confirm it returns the existing 404 error without a nil-pointer panic.
Written by the indexing model from the issue text.
Description
Bellow error throws when fetching invalid auth resources, in {{baseUrl}}/consents/:consentId/authorizations/:authorizationId path
time=2026-02-25T08:47:58.794+05:30 level=WARN msg="Client error occurred" correlation-id=5e51ee9c-a7ba-44cc-8abd-54cc122ce1f6 code=AR-4040 message="Authorization resource not found" description="auth resource 9fc8dde3-7baa-480a-86e6-d11e7584d9a1 does not belong to consent string" http_status=404
2026/02/25 08:48:14 http: panic serving 127.0.0.1:54999: runtime error: invalid memory address or nil pointer dereference
goroutine 107 [running]:
net/http.(*conn).serve.func1()
/usr/local/go/src/net/http/server.go:1943 +0xb4
panic({0x10475c220?, 0x104a271a0?})
/usr/local/go/src/runtime/panic.go:783 +0x120
github.com/wso2/openfgc/internal/authresource.(*authResourceService).GetAuthResource(0x14000060168, {0x1047cf138, 0x14000176570}, {0x140005880c9, 0x24}, {0x14000588095, 0x24}, {0x14000582610, 0x6})
/Users/hasithan/Projects/wso2/openfgc/consent-server/internal/authresource/service.go:242 +0x180
github.com/wso2/openfgc/internal/authresource.(*authResourceHandler).handleGet(0x14000012f20, {0x1047cecc0, 0x140003160f0}, 0x14000000c80)
/Users/hasithan/Projects/wso2/openfgc/consent-server/internal/authresource/handler.go:126 +0x1ac
net/http.HandlerFunc.ServeHTTP(0x14000130180?, {0x1047cecc0?, 0x140003160f0?}, 0x10?)
/usr/local/go/src/net/http/server.go:2322 +0x38
net/http.(*ServeMux).ServeHTTP(0x14000176510?, {0x1047cecc0, 0x140003160f0}, 0x14000000c80)
/usr/local/go/src/net/http/server.go:2861 +0x190
main.setupHTTPServer.WrapWithCorrelationID.CorrelationIDMiddleware.func1({0x1047cecc0, 0x140003160f0}, 0x14000000b40)
/Users/hasithan/Projects/wso2/openfgc/consent-server/internal/system/middleware/correlationid.go:57 +0xec
net/http.HandlerFunc.ServeHTTP(0x0?, {0x1047cecc0?, 0x140003160f0?}, 0x140002cfb50?)
/usr/local/go/src/net/http/server.go:2322 +0x38
net/http.serverHandler.ServeHTTP({0x140002fae00?}, {0x1047cecc0?, 0x140003160f0?}, 0x1?)
/usr/local/go/src/net/http/server.go:3340 +0xb0
net/http.(*conn).serve(0x140003818c0, {0x1047cf138, 0x140001882d0})
/usr/local/go/src/net/http/server.go:2109 +0x528
created by net/http.(*Server).Serve in goroutine 19
/usr/local/go/src/net/http/server.go:3493 +0x384
- Dominant language
- Go
- Stars
- 8
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wso2/openfgc
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100