APISonar


org.apache.ignite.internal.GridKernalContext.security

> org > apache > ignite > internal > GridKernalContext > security
org APIs apache APIs ignite APIs internal APIs GridKernalContext APIs security APIs

Example 1
private final GridKernalContext ctx;

    private void checkSecurityPermission(SecurityPermission perm)
        throws org.apache.ignite.plugin.security.SecurityException {
        if (!ctx.security().enabled())
            return;

        ctx.security().authorize(cacheName, perm);
    }
Example 2
protected final GridKernalContext ctx;

    @Override public void onDisconnected() {
        if (ctx.security().enabled())
            ctx.security().onSessionExpired(secCtx.subject().id());
    }
Example 3
private GridKernalContext ctx;

    public void checkSecurity(SecurityPermission op) throws SecurityException {
        if (CU.isSystemCache(name()))
            return;

        ctx.security().authorize(name(), op);
    }
Example 4
protected volatile GridKernalContext ctx;

    private void checkSecurity(Collection<Integer> cacheIds) {
        if (F.isEmpty(cacheIds))
            return;

        for (Integer cacheId : cacheIds) {
            DynamicCacheDescriptor desc = ctx.cache().cacheDescriptor(cacheId);

            if (desc != null)
                ctx.security().authorize(desc.cacheName(), SecurityPermission.CACHE_READ);
        }
    }
Example 5
static void authorizeCacheCreate(CacheConfiguration cfg, GridKernalContext ctx) {
        if(cfg != null) {
            ctx.security().authorize(cfg.getName(), SecurityPermission.CACHE_CREATE);

            if (cfg.isOnheapCacheEnabled() &&
                IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_DISABLE_ONHEAP_CACHE))
                throw new SecurityException("Authorization failed for enabling on-heap cache.");
        }
    }