http protocol and user authentication

Get help with the installation and running of the Agent Git or Agent SVN plug-ins. This section can also be used for posting comments, suggestions or submitting feature requests. Please do not post bug reports here. When in doubt post your question here.
kg
Posts: 5
Joined: Tue Dec 20, 2011 1:05 pm

http protocol and user authentication

Post by kg » Tue Dec 20, 2011 1:32 pm

I was wondering if it's possible to access via http an SVN repository that requires user authentication.

jussij
Site Admin
Posts: 2431
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Dec 21, 2011 1:28 am

I was wondering if it's possible to access via http an SVN repository.
To have Agent SVN access a http repository, you just need set the location of the http repository in the Agent SVN configuration utility.
I was wondering if it's possible to access via http an SVN repository that requires user authentication.
Yes.

What should happen is the Subversion request will fail with an access denied error.

At that point Agent SVN will prompt for a user ID and password and then repeat the failed request with the user authentication details provided.

Cheers Jussi

kg
Posts: 5
Joined: Tue Dec 20, 2011 1:05 pm

Post by kg » Wed Dec 21, 2011 7:22 am

Thanks for the answer! Could you tell me if AgentSVN was tested with PowerBuilder? This is what's happening in my case:

I have PowerBuilder 10.5 and TortoiseSVN (with command line utilities installed) as an SVN client. After I'd selected AgentSVN as the Source Control System to use and gone through a couple of first Import Project Wizard pages, I entered the URL of the SVN repository and selected HTTP as the protocol to use. The SVN Import Command showed the correct line, but after I clicked Next the wizard hung and stopped responding. When I tried the displayed command in a command window, svn.exe switched to the dialogue mode and asked me explicitly for user credentials. I entered them and the project was imported. After this whenever I try to import (other) projects, AgentSVN does not ask me for user credentials as if they were saved somewhere. Moreover, even though my projects get imported, I don't seem to be able to connect to SVN from within PowerBuilder; the only error messages I get are:

Nonspecific Error performing SccOpenProject.
Source control is in offline mode.
Restoring SCC Offline Status Cache from last backup.
Unable to initialize SCC status cache from backup D:\_POWERBUILDER_LOCAL\AgentSVN\AgentSVN2\AgentSVN2.pbc.
Initialization of Agent SVN Failed

Could you please tell me what I'm doing wrong?

jussij
Site Admin
Posts: 2431
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Dec 21, 2011 12:53 pm

Could you tell me if AgentSVN was tested with PowerBuilder?
No. I wasn't even aware PowerBuilder supported the MS-SCCI interface ;)
The SVN Import Command showed the correct line,
but after I clicked Next the wizard hung and stopped responding. When I
tried the displayed command in a command window, svn.exe switched to the
dialogue mode and asked me explicitly for user credentials. I entered
them and the project was imported.

This looks to me like the logon prompt window was just hidden. It probably means the parent window for the prompt is wrong :?
After this whenever I try to import (other) projects, AgentSVN
does not ask me for user credentials as if they were saved somewhere.

These details would are only saved to the RAM. To test this just stop and restart PowerBuilder you should get the logon prompted once again.
Nonspecific Error performing SccOpenProject.
Source control is in offline mode.
Restoring SCC Offline Status Cache from last backup.
Unable to initialize SCC status cache from backup D:\_POWERBUILDER_LOCAL\AgentSVN\AgentSVN2\AgentSVN2.pbc.
Initialization of Agent SVN Failed

Could you please tell me what I'm doing wrong?
I have nver seen that sort of message before :?

To help figure out what is happeneing, could you bring up the Windows regedit and find this Agent SVN debug option:

Code: Select all

HKEY_CURRENT_USER\Software\Xidicone\Agent SVN\HelpDebug
If you set this value to 1 Agent SVN will create a log file in the Agent SVN installation folder.

If you send me this log file as an attachment (see e-mail button below) I will try to figure out what is going wrong ;)

Cheers Jussi

kg
Posts: 5
Joined: Tue Dec 20, 2011 1:05 pm

Post by kg » Wed Dec 21, 2011 3:13 pm

jussij wrote:
Could you tell me if AgentSVN was tested with PowerBuilder?
No. I wasn't even aware PowerBuilder supported the MS-SCCI interface ;)
It does. The SCC tool I'm migrating from is MKS Integrity.
jussij wrote:
After this whenever I try to import (other) projects, AgentSVN
does not ask me for user credentials as if they were saved somewhere.

These details would are only saved to the RAM. To test this just stop and restart PowerBuilder you should get the logon prompted once again.
Well, I've experimenting for a couple of days so far and tried restarting PowerBuilder, restarting Windows and eventually turning off my PC. :)
jussij wrote:
Nonspecific Error performing SccOpenProject.
Source control is in offline mode.
Restoring SCC Offline Status Cache from last backup.
Unable to initialize SCC status cache from backup D:\_POWERBUILDER_LOCAL\AgentSVN\AgentSVN2\AgentSVN2.pbc.
Initialization of Agent SVN Failed

Could you please tell me what I'm doing wrong?
I have nver seen that sort of message before :?
Sure, they come from PowerBuilder.
jussij wrote:To help figure out what is happeneing, could you bring up the Windows regedit and find this Agent SVN debug option:

Code: Select all

HKEY_CURRENT_USER\Software\Xidicone\Agent SVN\HelpDebug
If you set this value to 1 Agent SVN will create a log file in the Agent SVN installation folder.

If you send me this log file as an attachment (see e-mail button below) I will try to figure out what is going wrong ;)
Thanks! Will do in a moment, but there's not much information in it...

kg
Posts: 5
Joined: Tue Dec 20, 2011 1:05 pm

Post by kg » Wed Dec 21, 2011 3:26 pm

There's another thing I noticed: the files with the extensions listed in the Ignore list get removed from the working copy. It's kind of undesirable in case of PowerBuilder (let me know if you are interested in details). Is this behaviour configurable? Or AgentSVN cannot work with folders that contain both member and non-member files?

jussij
Site Admin
Posts: 2431
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Dec 21, 2011 11:14 pm

Well, I've experimenting for a couple of days so far and tried restarting PowerBuilder, restarting Windows and eventually turning off my PC.

I had a look at the code (sorry, should have done that originally) and the login is being handled by svn itself :oops:

I was getting confused with how CVS handles the login, since Agent SVN is based on an earlier CVS MS-SCCI plugin.

Basically what happens is svn will do the authetication and then cache those details in the local working copy folder.

Below is an extract from the link page that describes how this works: http://www.yolinux.com/TUTORIALS/Subversion.html
Subversion Security Tips:

One should be aware of a possible Subversion client security hole. The Subversion client authentication will cache your login and password in your home directory in non-encrypted clear text. It will have file system security so others can not read the file however, it still is visible by root or by a root user of the file server if one is used for home directories.

Here are three solutions to reduce this potential security vulnerability:
1.Don't allow Subversion to cache the password: svn commit -F file.txt --no-auth-cache
This will request a username and password but will not store it.

2.Set the Subversion configuration file on server to not cache:

[auth]
store-auth-creds = no

3.Delete cached files when you logout. Reduces risk but does not eliminate it. This uses the bash shell logout script to perform a clean-up of the authentication files. File: ~/.bash_logout

But I think you have identified a bug since I think Agent SVN should delete the cache on it's shutdown ;)
the files with the extensions listed in the Ignore list get removed from the working copy.

The ignore list represents file extensions that are ignored by the SVN import. So in other words these files are not in the working copy because they are in fact not in the repository ;)
Is this behaviour configurable?

Yes. Just start the Agent SVN Congiguration utility and edit the ignore list.
It's kind of undesirable in case of PowerBuilder

If you remove the PowerBuilder file extensions from this ignore list then these files will get added to the repository on your next project import.
Or AgentSVN cannot work with folders that contain both member and non-member files?
Unfortunately I don't know the difference between a member and non-member files :(

The extensions found in the default ignore list are just the file extensions that I know of that represent compiler/tool generated file output.

Most of these file extensions represent files generated by Microsoft tools since these are the tools that I have used the most over the years.

Cheers Jussi

kg
Posts: 5
Joined: Tue Dec 20, 2011 1:05 pm

Post by kg » Thu Dec 22, 2011 3:01 pm

jussi wrote:
Or AgentSVN cannot work with folders that contain both member and non-member files?
Unfortunately I don't know the difference between a member and non-member files :(
Sorry, I probably used the MKS terminology. Members are files which are in the repository and non-members are those which are not.

jussij
Site Admin
Posts: 2431
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Dec 28, 2011 1:08 am

I have created a example of how to make Agent SVN work with the Power Builder IDE.

It can be found here: http://www.zeusedit.com/agent/pb/classic.html

And here is a link that describes how to use the source control from inside the Power Builder IDE:

http://infocenter.sybase.com/help/index ... HBIEAA.htm

Cheers Jussi

xAlx
Posts: 2
Joined: Tue Jul 10, 2012 10:05 am

Post by xAlx » Tue Jul 10, 2012 10:21 am

Hi!
I tried to use AgentSVN with PowerBuilder.
Everything is OK in local mode, but when I tried to use http - configuration window is hanging...no answers..
I understand that SVN tries to connect to http repository but I don't get any
logon popup window where I can fill credentials.

Could you help me to resolve?

jussij
Site Admin
Posts: 2431
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Tue Jul 10, 2012 2:40 pm

To help identify the issue could you try the following:

1) Start the Agent SVN configuration tool.

2) Turn on the Help debug the SVN configuration with extra logging option.

3) Start your IDE to replicate the issue you described earlier.

4) Go back to the Agent SVN configuration tool and use the ... button to acces the log file produced and send it to the e-mail address at the bottom of this posting.

The log file should help me determine what has gone wrong.

Thanks in advance.

Cheers Jussi

xAlx
Posts: 2
Joined: Tue Jul 10, 2012 10:05 am

Post by xAlx » Tue Jul 10, 2012 2:47 pm

I sent you log.
Please note that Agent SVN is hanging not even IDE

jussij
Site Admin
Posts: 2431
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Jul 11, 2012 12:54 am

From the log file you can see the following:
* Command: svn.exe info http://repository_location/svn/trunc/
* Directory:
Process started.
Process running....
Authentication realm: <http://repository_location:80> VisualSVN Server
Based on the last line, to me it looks like VisualSVN Server is asking for user logon details, which is why you are seeing the hang.

But I have never used VisualSVN Server so I am not 100% sure :(

You could test this by running the following command at the command line prompt:
svn.exe info http://repository_location/svn/trunc/
After running this command you should see a logon prompt.

You might be able to get around this by doing the login at the command line prompt and have SVN cache those logIn details. For the stock standard SVN Server I know this is possible, but I don't know enough about VisualSVN Server to know if this will also work for that server :(

Cheers Jussi

jussij
Site Admin
Posts: 2431
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Jul 11, 2012 1:06 am

I understand that SVN tries to connect to http repository but I don't get any logon popup window where I can fill credentials.

Unfortunately SVN does not have an explicit login prompt since it can ask for the login details at any time and it then caches those login details.

So to force the login you should be able to do this at the command line prompt:

Code: Select all

c:>svn.exe info http://repository_location/svn/trunc/
.... do the login here .....
c:>PowerBuilder.exe
Cheers Jussi

jussij
Site Admin
Posts: 2431
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Jul 11, 2012 9:02 am

The latest version of Agent now SVN implements a user login option: http://www.zeusedit.com/agent/

Cheers Jussi
Last edited by jussij on Sat Jul 20, 2013 8:17 am, edited 1 time in total.

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 1 guest