Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: integration SAML 2.0 connector Module code integration in liferay 7.1
Hi there,
I've incorporated the com.liferay.saml.opensaml.integration module in our environment which I've taken this jar file from provided source code (MarketPlace). But when I deploy this project. It throws lot of exceptions even I've put the jar files (dependencies) into build.gradle file also I've put the project dependencies.
Right now I want to remove my project dependencies I have'nt modify any code, I'm using the same code which I've taken from marketplace source jars. Below is my build.gradle file all dependencies I've put in this file.
dependencies {
compileOnly group: "org.osgi", name: "org.osgi.core", version: "6.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "3.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.0"
compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
compileOnly group: "jstl", name: "jstl", version: "1.2"
compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
compile group: 'biz.aQute.bnd', name: 'biz.aQute.bnd.annotation', version: '3.2.0'
compileOnly group: 'com.liferay', name: 'com.liferay.portal.configuration.metatype', version: '2.0.0'
compile group: 'com.liferay', name: 'com.liferay.osgi.util', version: '4.1.0'
compile group: 'com.liferay', name: 'com.liferay.petra.string', version: '2.1.1'
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.47'
compile group: 'com.liferay', name: 'com.liferay.osgi.service.tracker.collections', version: '2.0.0'
compile group: 'com.liferay', name: 'com.liferay.portal.security.exportimport.api', version: '1.0.0'
compile files('./src/main/resources/libs/com.liferay.saml.api-2.1.0.jar')
compile files('./src/main/resources/libs/com.liferay.saml.persistence.api-2.0.2.jar')
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.1'
compile group: 'org.opensaml', name: 'opensaml', version: '2.6.6'
compile group: 'org.opensaml', name: 'openws', version: '1.5.5'
compile group: 'org.opensaml', name: 'xmltooling', version: '1.4.6'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.47'
compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'
compile group: 'org.owasp.esapi', name: 'esapi', version: '2.0.1'
compile group: 'javax.xml.parsers', name: 'jaxp-api', version: '1.4.5'
}
Exception & build file is attached.
Please anyone to help, I'm kind of stuck here.
Thanks,
Sami
I've incorporated the com.liferay.saml.opensaml.integration module in our environment which I've taken this jar file from provided source code (MarketPlace). But when I deploy this project. It throws lot of exceptions even I've put the jar files (dependencies) into build.gradle file also I've put the project dependencies.
Right now I want to remove my project dependencies I have'nt modify any code, I'm using the same code which I've taken from marketplace source jars. Below is my build.gradle file all dependencies I've put in this file.
dependencies {
compileOnly group: "org.osgi", name: "org.osgi.core", version: "6.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "3.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.0"
compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
compileOnly group: "jstl", name: "jstl", version: "1.2"
compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
compile group: 'biz.aQute.bnd', name: 'biz.aQute.bnd.annotation', version: '3.2.0'
compileOnly group: 'com.liferay', name: 'com.liferay.portal.configuration.metatype', version: '2.0.0'
compile group: 'com.liferay', name: 'com.liferay.osgi.util', version: '4.1.0'
compile group: 'com.liferay', name: 'com.liferay.petra.string', version: '2.1.1'
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.47'
compile group: 'com.liferay', name: 'com.liferay.osgi.service.tracker.collections', version: '2.0.0'
compile group: 'com.liferay', name: 'com.liferay.portal.security.exportimport.api', version: '1.0.0'
compile files('./src/main/resources/libs/com.liferay.saml.api-2.1.0.jar')
compile files('./src/main/resources/libs/com.liferay.saml.persistence.api-2.0.2.jar')
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.1'
compile group: 'org.opensaml', name: 'opensaml', version: '2.6.6'
compile group: 'org.opensaml', name: 'openws', version: '1.5.5'
compile group: 'org.opensaml', name: 'xmltooling', version: '1.4.6'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.47'
compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'
compile group: 'org.owasp.esapi', name: 'esapi', version: '2.0.1'
compile group: 'javax.xml.parsers', name: 'jaxp-api', version: '1.4.5'
}
Exception & build file is attached.
Please anyone to help, I'm kind of stuck here.
Thanks,
Sami
Attachments:
The source is provided for you to debug saml.
It is not there for you to build your own module. Anything you do with that, you do on your own.
Besides, SAML is a security feature; whatever you are trying to do is likely going to weaken the security.
Instead of trying to roll your own module, perhaps you should step back and explain what you are trying to do. There may be a way to accomplish what you need without such a drastic step.
It is not there for you to build your own module. Anything you do with that, you do on your own.
Besides, SAML is a security feature; whatever you are trying to do is likely going to weaken the security.
Instead of trying to roll your own module, perhaps you should step back and explain what you are trying to do. There may be a way to accomplish what you need without such a drastic step.
Instead of trying to roll your own module, perhaps you should step back and explain what you are trying to do. There may be a way to accomplish what you need without such a drastic step.
Hi David,
Thanks for answering, To clarify I haven't changed any line of code, I'm just trying to build the module without any changes in the source code, and facing this problem.
Thanks,
Sami
Okay, then why?
Marketplace already releases the module and it works. No reason to build your own.
Marketplace already releases the module and it works. No reason to build your own.
Hi Sami, given the plugin is EE only, I assume you are an EE customer. As David points out, if you aren't modifying the source, why build it ? For a v6.2 codebase, I had to look at source to cater to multiple SP where each had its own NameId and Attributes which came from a 2nd database. At some point I will need to review doing similar also for DXP which is why I am watching this thread.
Hi,
Right now I need to build this project to add a method call in "importUser() of DefaultUserResolver.java". Can you tell me is this the only way to modify DefaultUserResolver class or there is another way ?
Thanks
Sami
Right now I need to build this project to add a method call in "importUser() of DefaultUserResolver.java". Can you tell me is this the only way to modify DefaultUserResolver class or there is another way ?
Thanks
Sami
As an OSGi component, you do not need to alter the Liferay code at all.
All you need to do is register a component with a higher service ranking.
This is why we start from what you need to do, not what you are trying to do. What you are trying to do does not lead to a good end. Following OSGi regular development patterns does.
All you need to do is register a component with a higher service ranking.
This is why we start from what you need to do, not what you are trying to do. What you are trying to do does not lead to a good end. Following OSGi regular development patterns does.
Sami UllahRight now I need to build this project to add a method call in "importUser() of DefaultUserResolver.java". Can you tell me is this the only way to modify DefaultUserResolver class or there is another way ?
Hi Sami, I don't know. I haven't looked at DXP source for this, nor have I reviewed in any detail how you might do what you want to do, or what I likely will need to do by using a higher ranking component, as David suggests. I can understand though that as an EE plugin, it might be officially off limits to modify source. I don't work for Liferay so can't comment on the latter point.
Yes marketplace releases the source code jar files which contains only source code but no build scripts. I'm having trouble removing runtime dependencies .
Like I said, the source is provided for debugging only.