[JBoss JIRA] (JBIDE-18769) ResourceException when generating hbm.xml
by Jiri Peterka (JIRA)
[ https://issues.jboss.org/browse/JBIDE-18769?page=com.atlassian.jira.plugi... ]
Jiri Peterka updated JBIDE-18769:
---------------------------------
Workaround Description: if expected path exists file(s) are generated
Workaround: Workaround Exists
> ResourceException when generating hbm.xml
> -----------------------------------------
>
> Key: JBIDE-18769
> URL: https://issues.jboss.org/browse/JBIDE-18769
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: hibernate
> Affects Versions: 4.2.0.Final
> Reporter: Rastislav Wagner
> Assignee: Koen Aers
> Priority: Blocker
> Fix For: 4.2.2.Final, 4.3.0.Alpha1
>
>
> {code}
> org.eclipse.core.internal.resources.ResourceException: Resource '/jboss-javaee6-webapp/org/jboss/tools/examples/model' does not exist.
> at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341)
> at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215)
> at org.eclipse.core.internal.resources.File.create(File.java:115)
> at org.eclipse.core.internal.resources.File.create(File.java:188)
> at org.eclipse.jdt.internal.corext.refactoring.nls.changes.CreateFileChange.perform(CreateFileChange.java:165)
> at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
> at org.hibernate.eclipse.jdt.ui.wizards.NewHibernateMappingPreviewPage.performFinish(NewHibernateMappingPreviewPage.java:299)
> at org.hibernate.eclipse.jdt.ui.wizards.NewHibernateMappingFileWizard.performFinish(NewHibernateMappingFileWizard.java:408)
> at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
> at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
> at org.eclipse.jface.window.Window.open(Window.java:808)
> at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:269)
> at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
> at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
> at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
> at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
> at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
> at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
> at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
> at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
> at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
> at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
> at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:343)
> at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:159)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (JBDS-3188) Support of krb5-principal keys in openshift-java-client (eclipse)
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBDS-3188?page=com.atlassian.jira.plugin.... ]
Andre Dietisheim edited comment on JBDS-3188 at 12/17/14 10:06 AM:
-------------------------------------------------------------------
One needs to add the kerberos key to OpenShift via a key type "krb5-principal" as one can see here: http://www.openshift.org/documentation/rest_api/key-response-addnewsshkey...
{code:javascript}
"rel": "Update SSH key",
"required_params": [
{
"description": "Type of Key",
"invalid_options": [
],
"name": "type",
"type": "string",
"valid_options": [
"ssh-rsa",
"ssh-dss",
"ssh-rsa-cert-v01(a)openssh.com",
"ssh-dss-cert-v01(a)openssh.com",
"ssh-rsa-cert-v00(a)openssh.com",
"ssh-dss-cert-v00(a)openssh.com",
"krb5-principal"
]
},
{code}
was (Author: adietish):
One needs to add the kerberos key to OpenShift via a key type "krb5-principal" as one can see here: http://www.openshift.org/documentation/rest_api/key-response-addnewsshkey...
{code:javascript}
"rel": "Update SSH key",
"required_params": [
{
"description": "Type of Key",
"invalid_options": [
],
"name": "type",
"type": "string",
"valid_options": [
"ssh-rsa",
"ssh-dss",
"ssh-rsa-cert-v01(a)openssh.com",
"ssh-dss-cert-v01(a)openssh.com",
"ssh-rsa-cert-v00(a)openssh.com",
"ssh-dss-cert-v00(a)openssh.com",
"krb5-principal"
]
},
{code}
> Support of krb5-principal keys in openshift-java-client (eclipse)
> ------------------------------------------------------------------
>
> Key: JBDS-3188
> URL: https://issues.jboss.org/browse/JBDS-3188
> Project: Developer Studio (JBoss Developer Studio)
> Issue Type: Feature Request
> Components: openshift
> Affects Versions: 8.0.x
> Reporter: Christos Triantafyllidis
> Assignee: Max Rydahl Andersen
>
> The openshift-java-client which is used by the eclipse plugin doesn't support this krb5-principal keys.
> This request is to be able to clone/pull/push updates to openshift application repositories when krb5 credentials are already available and the openshift broker supports krb5 authentication.
> https://github.com/openshift/openshift-java-client/blob/master/src/main/j...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (JBIDE-18769) ResourceException when generating hbm.xml
by Jiri Peterka (JIRA)
[ https://issues.jboss.org/browse/JBIDE-18769?page=com.atlassian.jira.plugi... ]
Jiri Peterka commented on JBIDE-18769:
--------------------------------------
Yes, it tries to generate at wrong path. If the folder exists (is created manually) hbm.xml file is generated.
> ResourceException when generating hbm.xml
> -----------------------------------------
>
> Key: JBIDE-18769
> URL: https://issues.jboss.org/browse/JBIDE-18769
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: hibernate
> Affects Versions: 4.2.0.Final
> Reporter: Rastislav Wagner
> Assignee: Koen Aers
> Priority: Blocker
> Fix For: 4.2.2.Final, 4.3.0.Alpha1
>
>
> {code}
> org.eclipse.core.internal.resources.ResourceException: Resource '/jboss-javaee6-webapp/org/jboss/tools/examples/model' does not exist.
> at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341)
> at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215)
> at org.eclipse.core.internal.resources.File.create(File.java:115)
> at org.eclipse.core.internal.resources.File.create(File.java:188)
> at org.eclipse.jdt.internal.corext.refactoring.nls.changes.CreateFileChange.perform(CreateFileChange.java:165)
> at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
> at org.hibernate.eclipse.jdt.ui.wizards.NewHibernateMappingPreviewPage.performFinish(NewHibernateMappingPreviewPage.java:299)
> at org.hibernate.eclipse.jdt.ui.wizards.NewHibernateMappingFileWizard.performFinish(NewHibernateMappingFileWizard.java:408)
> at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
> at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
> at org.eclipse.jface.window.Window.open(Window.java:808)
> at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:269)
> at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
> at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
> at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
> at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
> at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
> at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
> at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
> at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
> at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
> at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
> at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:343)
> at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:159)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (JBDS-3188) Support of krb5-principal keys in openshift-java-client (eclipse)
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBDS-3188?page=com.atlassian.jira.plugin.... ]
Andre Dietisheim commented on JBDS-3188:
----------------------------------------
One needs to add the kerberos key to OpenShift via a key type "krb5-principal" as one can see here: http://www.openshift.org/documentation/rest_api/key-response-addnewsshkey...
{code:javascript}
"rel": "Update SSH key",
"required_params": [
{
"description": "Type of Key",
"invalid_options": [
],
"name": "type",
"type": "string",
"valid_options": [
"ssh-rsa",
"ssh-dss",
"ssh-rsa-cert-v01(a)openssh.com",
"ssh-dss-cert-v01(a)openssh.com",
"ssh-rsa-cert-v00(a)openssh.com",
"ssh-dss-cert-v00(a)openssh.com",
"krb5-principal"
]
},
{code}
> Support of krb5-principal keys in openshift-java-client (eclipse)
> ------------------------------------------------------------------
>
> Key: JBDS-3188
> URL: https://issues.jboss.org/browse/JBDS-3188
> Project: Developer Studio (JBoss Developer Studio)
> Issue Type: Feature Request
> Components: openshift
> Affects Versions: 8.0.x
> Reporter: Christos Triantafyllidis
> Assignee: Max Rydahl Andersen
>
> The openshift-java-client which is used by the eclipse plugin doesn't support this krb5-principal keys.
> This request is to be able to clone/pull/push updates to openshift application repositories when krb5 credentials are already available and the openshift broker supports krb5 authentication.
> https://github.com/openshift/openshift-java-client/blob/master/src/main/j...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (JBDS-3188) Support of krb5-principal keys in openshift-java-client (eclipse)
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBDS-3188?page=com.atlassian.jira.plugin.... ]
Andre Dietisheim edited comment on JBDS-3188 at 12/17/14 10:03 AM:
-------------------------------------------------------------------
The server side of the krb5 authentication can be found here: https://github.com/vindir/openshift-external-postgresql-cartridge/blob/ma...
{code:ruby}
def login(request, params, cookies)
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
data = JSON.parse(params['json_data'])
return authenticate(request, data['rhlogin'], params['password'])
end
end
def authenticate(request, login, password)
params = request.request_parameters()
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
raise OpenShift::AccessDeniedException if login.nil? || login.empty? || password.nil? || password.empty?
krb5 = Krb5.new
# get the default realm
default_realm = krb5.get_default_realm
Rails.logger.debug "Default realm is: " + default_realm
# try to cache non-existant data (this should fail and throw an exception)
begin
krb5.cache
rescue Krb5Auth::Krb5::Exception
Rails.logger.debug "Failed caching credentials before obtaining them. Continuing..."
end
if krb5.get_init_creds_password(login,password)
krb5.close
return {:username => login, :auth_method => :login}
else
krb5.close
raise OpenShift::AccessDeniedException
end
end
end
{code}
was (Author: adietish):
The server side of the krb5 authentication can be found here: https://github.com/vindir/openshift-external-postgresql-cartridge/blob/ma...
{code:ruby}
def login(request, params, cookies)
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
data = JSON.parse(params['json_data'])
return authenticate(request, data['rhlogin'], params['password'])
end
end
def authenticate(request, login, password)
params = request.request_parameters()
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
raise OpenShift::AccessDeniedException if login.nil? || login.empty? || password.nil? || password.empty?
krb5 = Krb5.new
# get the default realm
default_realm = krb5.get_default_realm
Rails.logger.debug "Default realm is: " + default_realm
# try to cache non-existant data (this should fail and throw an exception)
begin
krb5.cache
rescue Krb5Auth::Krb5::Exception
Rails.logger.debug "Failed caching credentials before obtaining them. Continuing..."
end
if krb5.get_init_creds_password(login,password)
krb5.close
return {:username => login, :auth_method => :login}
else
krb5.close
raise OpenShift::AccessDeniedException
end
end
end
{code}
> Support of krb5-principal keys in openshift-java-client (eclipse)
> ------------------------------------------------------------------
>
> Key: JBDS-3188
> URL: https://issues.jboss.org/browse/JBDS-3188
> Project: Developer Studio (JBoss Developer Studio)
> Issue Type: Feature Request
> Components: openshift
> Affects Versions: 8.0.x
> Reporter: Christos Triantafyllidis
> Assignee: Max Rydahl Andersen
>
> The openshift-java-client which is used by the eclipse plugin doesn't support this krb5-principal keys.
> This request is to be able to clone/pull/push updates to openshift application repositories when krb5 credentials are already available and the openshift broker supports krb5 authentication.
> https://github.com/openshift/openshift-java-client/blob/master/src/main/j...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (JBDS-3188) Support of krb5-principal keys in openshift-java-client (eclipse)
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBDS-3188?page=com.atlassian.jira.plugin.... ]
Andre Dietisheim edited comment on JBDS-3188 at 12/17/14 10:01 AM:
-------------------------------------------------------------------
The server side of the krb5 authentication can be found here: https://github.com/vindir/openshift-external-postgresql-cartridge/blob/ma...
{code:ruby}
def login(request, params, cookies)
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
data = JSON.parse(params['json_data'])
return authenticate(request, data['rhlogin'], params['password'])
end
end
def authenticate(request, login, password)
params = request.request_parameters()
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
raise OpenShift::AccessDeniedException if login.nil? || login.empty? || password.nil? || password.empty?
krb5 = Krb5.new
# get the default realm
default_realm = krb5.get_default_realm
Rails.logger.debug "Default realm is: " + default_realm
# try to cache non-existant data (this should fail and throw an exception)
begin
krb5.cache
rescue Krb5Auth::Krb5::Exception
Rails.logger.debug "Failed caching credentials before obtaining them. Continuing..."
end
if krb5.get_init_creds_password(login,password)
krb5.close
return {:username => login, :auth_method => :login}
else
krb5.close
raise OpenShift::AccessDeniedException
end
end
end
{code}
was (Author: adietish):
The server side of the krb5 authentication can be found here:
{code:title=https://github.com/vindir/openshift-external-postgresql-cartridge/blob/master/plugins/auth/kerberos/lib/openshift/kerberos_auth_service.rb#L108}
def login(request, params, cookies)
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
data = JSON.parse(params['json_data'])
return authenticate(request, data['rhlogin'], params['password'])
end
end
def authenticate(request, login, password)
params = request.request_parameters()
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
raise OpenShift::AccessDeniedException if login.nil? || login.empty? || password.nil? || password.empty?
krb5 = Krb5.new
# get the default realm
default_realm = krb5.get_default_realm
Rails.logger.debug "Default realm is: " + default_realm
# try to cache non-existant data (this should fail and throw an exception)
begin
krb5.cache
rescue Krb5Auth::Krb5::Exception
Rails.logger.debug "Failed caching credentials before obtaining them. Continuing..."
end
if krb5.get_init_creds_password(login,password)
krb5.close
return {:username => login, :auth_method => :login}
else
krb5.close
raise OpenShift::AccessDeniedException
end
end
end
{code}
> Support of krb5-principal keys in openshift-java-client (eclipse)
> ------------------------------------------------------------------
>
> Key: JBDS-3188
> URL: https://issues.jboss.org/browse/JBDS-3188
> Project: Developer Studio (JBoss Developer Studio)
> Issue Type: Feature Request
> Components: openshift
> Affects Versions: 8.0.x
> Reporter: Christos Triantafyllidis
> Assignee: Max Rydahl Andersen
>
> The openshift-java-client which is used by the eclipse plugin doesn't support this krb5-principal keys.
> This request is to be able to clone/pull/push updates to openshift application repositories when krb5 credentials are already available and the openshift broker supports krb5 authentication.
> https://github.com/openshift/openshift-java-client/blob/master/src/main/j...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months
[JBoss JIRA] (JBDS-3188) Support of krb5-principal keys in openshift-java-client (eclipse)
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBDS-3188?page=com.atlassian.jira.plugin.... ]
Andre Dietisheim commented on JBDS-3188:
----------------------------------------
The server side of the krb5 authentication can be found here:
{code:title=https://github.com/vindir/openshift-external-postgresql-cartridge/blob/master/plugins/auth/kerberos/lib/openshift/kerberos_auth_service.rb#L108}
def login(request, params, cookies)
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
data = JSON.parse(params['json_data'])
return authenticate(request, data['rhlogin'], params['password'])
end
end
def authenticate(request, login, password)
params = request.request_parameters()
if params['broker_auth_key'] && params['broker_auth_iv']
validate_broker_key(params['broker_auth_iv'], params['broker_auth_key'])
else
raise OpenShift::AccessDeniedException if login.nil? || login.empty? || password.nil? || password.empty?
krb5 = Krb5.new
# get the default realm
default_realm = krb5.get_default_realm
Rails.logger.debug "Default realm is: " + default_realm
# try to cache non-existant data (this should fail and throw an exception)
begin
krb5.cache
rescue Krb5Auth::Krb5::Exception
Rails.logger.debug "Failed caching credentials before obtaining them. Continuing..."
end
if krb5.get_init_creds_password(login,password)
krb5.close
return {:username => login, :auth_method => :login}
else
krb5.close
raise OpenShift::AccessDeniedException
end
end
end
{code}
> Support of krb5-principal keys in openshift-java-client (eclipse)
> ------------------------------------------------------------------
>
> Key: JBDS-3188
> URL: https://issues.jboss.org/browse/JBDS-3188
> Project: Developer Studio (JBoss Developer Studio)
> Issue Type: Feature Request
> Components: openshift
> Affects Versions: 8.0.x
> Reporter: Christos Triantafyllidis
> Assignee: Max Rydahl Andersen
>
> The openshift-java-client which is used by the eclipse plugin doesn't support this krb5-principal keys.
> This request is to be able to clone/pull/push updates to openshift application repositories when krb5 credentials are already available and the openshift broker supports krb5 authentication.
> https://github.com/openshift/openshift-java-client/blob/master/src/main/j...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 3 months