cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to log in to SAP MII by using a custom xApp?

Former Member
0 Likes
207

Hi there,

I'm developing a custom xApp with a context root of /mycustomapp

I use some security contraints for it so the user has to log in to view the xApp.

As I use some MII services the user has to be logged in to SAP MII, too. However, logging in to SAP NetWeaver doesn't automatically sign in the user to SAP MII, too.

Is it possible at all?

Accessing /mycustomapp leads to a login mask, but the user should be logged in to SAP MII, too.

Regards

Tobias

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

Hi Tobias,

If you are logged in to SAP NetWeaver then you should have access to MII automatically as long as your application sends the SSO2 cookie and the session parameters.

What are the security constraints that you have for your xApp?

Regards,

Krasi

Former Member
0 Likes

web.xml


<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

  id="WebApp_ID" version="2.5">

  <display-name>mycustomapp</display-name>

  <welcome-file-list>

  <welcome-file>index.html</welcome-file>

  <welcome-file>index.htm</welcome-file>

  <welcome-file>index.jsp</welcome-file>

  <welcome-file>default.html</welcome-file>

  <welcome-file>default.htm</welcome-file>

  <welcome-file>default.jsp</welcome-file>

  </welcome-file-list>

  <security-constraint>

  <display-name>Authentication of Users</display-name>

  <web-resource-collection>

  <web-resource-name>My Resource Name</web-resource-name>

  <url-pattern>/*</url-pattern>

  <http-method>GET</http-method>

  <http-method>POST</http-method>

  </web-resource-collection>

  <auth-constraint>

  <role-name>My_User_Role</role-name>

  </auth-constraint>

  </security-constraint>

  <login-config>

  <auth-method>FORM</auth-method>

  <realm-name>MyRealm</realm-name>

  </login-config>

  <security-role>

  <role-name>My_User_Role</role-name>

  </security-role>

</web-app>

web-j2ee-engine.xml


<?xml version="1.0" encoding="UTF-8"?>

<web-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:noNamespaceSchemaLocation="web-j2ee-engine.xsd">

  <spec-version>2.4</spec-version>

  <security-role-map>

  <role-name>My_User_Role</role-name>

  <server-role-name>My_User_Role</server-role-name>

  </security-role-map>

</web-j2ee-engine>

Besides having the role My_User_Role my user also has the SAP_XMII_User role (and the corresponding developer roles).

Regards

Tobias My_User_Role

Former Member
0 Likes

Hi Krasi,

do you have an idea about how to tell my xApp to automatically log in to SAP MII when logging in to my security constraints?

Regards

Tobias