Oracle WebCenter Portal Cloud launch.

Recently Oracle Launch Oracle WebCenter portal cloud This took little long as expected. Features of Oracle WebCenter portal cloud

– WebCenter Portal Cloud enables automated product deployment and configuration.
– A client can focus on building innovative, integrated, and secure business mashups on the cloud.
– Scale out your deployment at will when you anticipate demand. Scale in when the demands are high.
– Easily monitor your deployments, automate database and application backup, restore from any point in time.
– Migrate your on-premises Oracle WebCenter Portal deployment to WebCenter Portal Cloud.
– Easy maintenance because Oracle Manages Infrastructure.
– Automated Application Backup -Backup WebCenter Portal application on the Cloud
– Automated Database Backup -Schedule automated backups of the database with zero downtime
– Easy to integrate with oracle identity service and SSO.

Oracle WebCenter Portal Cloud (WCPC) -Oracle WebCenter Portal Cloud (a customer managed service) provides an enterprise grade portal platform as a subscription service on top of Java Cloud Service so that you can quickly provision your new platform, and start developing and deploying secure portals for intranets, extranets, and self-services.
Internally this product built up on java cloud service(JCS) and database as cloud service (DBCS).Any customer who plans to migration to WCPC should have or purchase Oracle Java Cloud Service(JCS) – Enterprise Edition – High Memory OR Oracle Java Cloud Service – Suite – High Memory
Database Cloud Service

Read more about Oracle WebCenter Portal cloud https://docs.oracle.com/cloud/latest/webcenter-portal-cloud/index.html

Good tutorial about Oracle WebCenter Portal provisioning with java Cloud service (JCS)

Custom Role Mapping Provider in Weblogic

The default (that is, active) security realm for WebLogic Server includes a WebLogic Role Mapping provider. The WebLogic Role Mapping provider computes dynamic security roles for a specific user (subject) with respect to a specific protected WebLogic resource for each of the default users and WebLogic resources. The WebLogic Role Mapping provider supports the deployment and undeployment of security roles within the system. The WebLogic Role Mapping provider uses the same security policy engine as the WebLogic Authorization provider. If you want to use a role mapping mechanism that already exists within your organization, you could create a custom role mapping provider to tie into that system.

You need 3 Files, a XML File with the configuration, the Provider and the Implementation of a Role.

The Config File:

<?xml version="1.0" ?>
<!DOCTYPE MBeanType SYSTEM "commo.dtd">

<MBeanType
 Name          = "MYRoleMapper"
 DisplayName   = "MYRoleMapper"
 Package       = "MY.security"
 Extends       = "weblogic.management.security. authorization.RoleMapper"
 PersistPolicy = "OnUpdate"
>
 <MBeanAttribute
  Name          = "ProviderClassName"
  Type          = "java.lang.String"
  Writeable     = "false"
  Preprocessor  = "weblogic.management.configuration.LegalHelper.checkClassName(value)"
  Default       = "&quot;MY.security.MYRoleMapperProviderImpl&quot;"
 />

 <MBeanAttribute
  Name          = "Description"
  Type          = "java.lang.String"
  Writeable     = "false"
  Default       = "&quot;MY RM provider &quot;"
 />

 <MBeanAttribute
  Name          = "Version"
  Type          = "java.lang.String"
  Writeable     = "false"
  Default       = "&quot;1.2&quot;"
 />

</MBeanType>

The Actual Provider MYRoleMapperProviderImpl.java:

public class MYRoleMapperProviderImpl implements RoleProvider, RoleMapper {
    private String description;
    private static final Map<String, SecurityRole> NO_ROLES = Collections.unmodifiableMap(new HashMap<String, SecurityRole>(1));

    private final static String RESSOURCE_URL = "<url>";
    private final static String RESSOURCE_EJB = "<ejb>";

    private enum rollen {
        READER;
    }

    @Override
    public void initialize(ProviderMBean mbean, SecurityServices services) {
        description = mbean.getDescription() + "\n" + mbean.getVersion();
    }

    @Override
    public String getDescription() {
        return description;
    }

    @Override
    public void shutdown() {

    }

    @Override
    public RoleMapper getRoleMapper() {
        return this;
    }

    @Override
    public Map<String, SecurityRole> getRoles(Subject subject, Resource resource, ContextHandler handler) {
        Map<String, SecurityRole> roles = new HashMap<String, SecurityRole>();
        Set<Principal> principals = subject.getPrincipals();
        for (Resource res = resource; res != null; res = res.getParentResource()) {
            getRoles(res, principals, roles);
        }
        if (roles.isEmpty()) {
            return NO_ROLES;
        }
        return roles;
    }

    private void getRoles(Resource resource, Set<Principal> principals, Map<String, SecurityRole> roles) {
        if (resource.getType() == RESSOURCE_URL || resource.getType() == RESSOURCE_EJB) {
                            roles.put(rollen.READER.toString(), new MYSecurityRoleImpl(rollen.READER.toString(), "READER Rolle"));          
            }
    }
}

simple Role Implementation:

package MY.security;

import weblogic.security.service.SecurityRole;

public class MYSecurityRoleImpl implements SecurityRole {

    private String _roleName;
       private String _description;
       private int _hashCode;

       public MYSecurityRoleImpl(String roleName, String description)
       {
          _roleName = roleName;
          _description = description;
          _hashCode = roleName.hashCode() + 17;
       }

       public boolean equals(Object secRole)
       {
          if (secRole == null) 
          {
             return false;
          }

          if (this == secRole) 
          {
             return true;
          }

          if (!(secRole instanceof MYSecurityRoleImpl)) 
          {
             return false;
          }

          MYSecurityRoleImpl anotherSecRole = (MYSecurityRoleImpl)secRole;

          if (!_roleName.equals(anotherSecRole.getName())) 
          {
             return false;
          }

          return true;
       }

       public String toString () { return _roleName; }
       public int hashCode () { return _hashCode; }
       public String getName () { return _roleName; }
       public String getDescription () { return _description; }
}

For more information go through documentation

Now you need to configure in weblogic admin console in security realms – providers- new

Happy learning with Vinay in techartifact…..

Oracle WebCenter Portal 12c Jump Start Kit available

Great news for webcenter portal developer. Now Oracle WebCenter Portal Jump Start Kit is available. Get Webcenter Portal JSk from here

The Jump Start Kit (JSK) for WebCenter Portal is a utility that installs a fully functional version of WebCenter Portal pre-integrated with Oracle WebCenter Content, including key features enabled and preconfigured, all within a single machine instance (virtual or physical). The JSK supports Linux x86-64. It is targeted to developers or product evaluation only, and is not supported for production use.

The JSK expects you to download the required software from the Oracle Technology Network. This includes the Oracle Database, Oracle WebLogic Server, WebCenter Content, WebCenter Portal, Oracle HTTP Server, as well as Oracle Fusion Middleware utilities (see exact list with links below). It then installs and configures each of these to interoperate with each other.

The JSK then configures WebCenter Content and WebCenter Portal integration points such as Inbound Refinery, and configures several WebCenter Portal features, the pagelet producer, blogs, wikis, and lists.

You do not have to interact with the JSK installer during this process. Total run time depends on the speed of the machine being installed to, but tends to take between 1.5 to 2 hours.

The JSK portal is targeted for developer-only non-production use because of several assumptions made about the topology, including running all services on one machine.

Happy webcenter portal learning with Vinay & JSK