[
https://issues.apache.org/jira/browse/IGNITE-29319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mikhail Petrov updated IGNITE-29319:
------------------------------------
Description:
Service lifecycle methods run under the security context of whoever triggered
the deployment event, not the service deployer
Problem
Since IGNITE-28681, the services deployment worker restores the operation
context of the event that queued the deployment task. As a result,
Service.init(), execute() and cancel() run under the security context of
whoever caused that cluster event, not the user who deployed the service.
Example
- Server node has a service in its static configuration. The service's init()
creates a cache. The server node has CACHE_CREATE; the cluster starts inactive.
- An administrator whose only permission is ADMIN_CLUSTER_STATE activates the
cluster
- During activation the service is deployed, and its init() runs under the
administrator's security context. Cache creation fails.
The same mechanism applies to other triggers:
- Node join or failover: a service is redeployed under the security context of
the node that joined or left, not its deployer.
- Deactivation and cache destruction: cancel() runs as whoever deactivated the
cluster or destroyed the cache.
- execute(): keeps the triggering subject's context for the whole lifetime of
the service.
Summary: Make service init/execute/close method code to be executed on
behalf service deployer (was: Fix service init/execute/close method code to be
executed on behalf service deployer)
> Make service init/execute/close method code to be executed on behalf service
> deployer
> -------------------------------------------------------------------------------------
>
> Key: IGNITE-29319
> URL: https://issues.apache.org/jira/browse/IGNITE-29319
> Project: Ignite
> Issue Type: Bug
> Reporter: Mikhail Petrov
> Assignee: Mikhail Petrov
> Priority: Major
>
> Service lifecycle methods run under the security context of whoever triggered
> the deployment event, not the service deployer
> Problem
> Since IGNITE-28681, the services deployment worker restores the operation
> context of the event that queued the deployment task. As a result,
> Service.init(), execute() and cancel() run under the security context of
> whoever caused that cluster event, not the user who deployed the service.
> Example
> - Server node has a service in its static configuration. The service's init()
> creates a cache. The server node has CACHE_CREATE; the cluster starts
> inactive.
> - An administrator whose only permission is ADMIN_CLUSTER_STATE activates the
> cluster
> - During activation the service is deployed, and its init() runs under the
> administrator's security context. Cache creation fails.
> The same mechanism applies to other triggers:
> - Node join or failover: a service is redeployed under the security context
> of the node that joined or left, not its deployer.
> - Deactivation and cache destruction: cancel() runs as whoever deactivated
> the cluster or destroyed the cache.
> - execute(): keeps the triggering subject's context for the whole lifetime of
> the service.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)