apache / apache/grails-core

Make plugin compatible with multi tenancy in grails > 3.1

Open
#15,907 1 comment 5 reactions 0 assignees View on GitHub
relates-to:spring-security
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

AuthenticationToken resolving doesn't support MultiTenant implementation.
Like:

```java
import grails.gorm.MultiTenant

class AuthenticationToken implements MultiTenant {

Long tenantId
String username
String token

static constraints = {
}
}
```

With this implementation, i get this error on login:
```
ERROR: column this_.tenant_id does not exist
```

Do you have an idea how to solve this plz ?

In my application, User domain class is multitenant so AuthenticationToken must be too.

Contributor guide

Open the contributing guide

Research direction

Start with AuthenticationToken resolution during login and the MultiTenant implementation shown in the issue, then trace why the lookup expects tenant_id. Reproduce the login failure in a Grails application with a multitenant User and AuthenticationToken; done means authentication succeeds without the missing-column error.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.