Buckets:

download
raw
4.66 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The repo contains only the Spring Boot service (geosamples-ingest-service); no in-repo UI/SDK/CLI sends the opaque access token to JwtUrlFilter. Callers are outside the repo."
},
{
"role": "Authentication enforcer",
"status": "present",
"symbol": "doFilterInternal",
"file": "geosamples-ingest-service/src/main/java/gov/noaa/ncei/mgg/geosamples/ingest/api/security/JwtUrlFilter.java",
"lines": "62",
"notes": "doFilterInternal in JwtUrlFilter, registered in the /api/** chain at ApiWebSecurityConfiguration.java:36 (addFilterBefore). It resolves the bearer value, checks it against stored opaque tokens via tokenService.authenticate (line 66) and then runs doAccessTokenAuth (line 54: Spring AuthenticationFilter + ApiProviderAuthenticationProvider, failure -> ApiAccessDeniedHandler 403); non-matching bearer values go to the stateless JWT branch, which is not this pattern."
},
{
"role": "Verifier",
"status": "present",
"symbol": "authenticate",
"file": "geosamples-ingest-service/src/main/java/gov/noaa/ncei/mgg/geosamples/ingest/service/TokenService.java",
"lines": "55",
"notes": "TokenService.authenticate, called from JwtUrlFilter.java:66 and from ApiProviderAuthenticationProvider.authenticate (ApiProviderAuthenticationProvider.java:42, which throws AuthenticationServiceException on empty). It hashes the opaque token (searchableHashEncoder) and resolves it against the DB token table, returning the principal (TokenAuthorization) or empty."
},
{
"role": "Session manager",
"status": "present",
"symbol": "findByTokenHash",
"file": "geosamples-ingest-service/src/main/java/gov/noaa/ncei/mgg/geosamples/ingest/jpa/repository/TokenRepository.java",
"lines": "14",
"notes": "Called from TokenService.authenticate (TokenService.java:56). Spring Data derived query declared in the repo over the GeosamplesTokenEntity table; it maps a stored token hash to its user. Caveat: these are long-lived API access tokens (created by TokenService.createToken) rather than login sessions with expiry."
},
{
"role": "Authorisation enforcer",
"status": "present",
"symbol": "configure",
"file": "geosamples-ingest-service/src/main/java/gov/noaa/ncei/mgg/geosamples/ingest/api/security/ApiWebSecurityConfiguration.java",
"lines": "30",
"notes": "configure in ApiWebSecurityConfiguration builds the /api/** chain: authorizeRequests() (line 37) installs Spring's FilterSecurityInterceptor, which runs after JwtUrlFilter (line 36) and denies with ApiAccessDeniedHandler (lines 206-207); anyRequest().denyAll() at line 200."
},
{
"role": "Decider",
"status": "external",
"symbol": "decide",
"file": "geosamples-ingest-service/src/main/java/gov/noaa/ncei/mgg/geosamples/ingest/api/security/ApiWebSecurityConfiguration.java",
"lines": "37",
"notes": "Reached from the Authorisation enforcer configure (ApiWebSecurityConfiguration.java:37 authorizeRequests()); Spring Security's AffirmativeBased AccessDecisionManager.decide with WebExpressionVoter evaluates hasAuthority(...) against the principal's granted authorities. No in-repo decision method."
},
{
"role": "Policy provider",
"status": "present",
"symbol": "getAuthorities",
"file": "geosamples-ingest-service/src/main/java/gov/noaa/ncei/mgg/geosamples/ingest/service/TokenService.java",
"lines": "41",
"notes": "Called from TokenService.fromTokenEntity (line 52) on the Verifier path; loads the principal's privileges from the DB (user role -> role authorities) plus ROLE_AUTHENTICATED_USER, which ApiProviderAuthenticationProvider.toAuthentication (line 28) turns into GrantedAuthorities. The URL->authority rules themselves are hard-coded in ApiWebSecurityConfiguration.configure (lines 39-197)."
},
{
"role": "System",
"status": "present",
"symbol": "create",
"file": "geosamples-ingest-service/src/main/java/gov/noaa/ncei/mgg/geosamples/ingest/api/controller/provider/ProviderSampleController.java",
"lines": "64",
"notes": "ProviderSampleController.create (POST /api/v1/provider/sample), guarded by hasAuthority(ROLE_PROVIDER_SAMPLE_CREATE) at ApiWebSecurityConfiguration.java:155; runs only after JwtUrlFilter authenticates the opaque token and the authorisation check passes. Other /api/v1/** controllers are guarded the same way."
}
]
}

Xet Storage Details

Size:
4.66 kB
·
Xet hash:
68d912b895a87a1e1bbd3baddabe63f418415cf726246592816783c183825631

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.