BitShares Forum

Main => General Discussion => Topic started by: abit on January 14, 2015, 02:02:24 pm

Title: Possible log in to this forum with BTS id?
Post by: abit on January 14, 2015, 02:02:24 pm
Just an idea, don't know whether others asked yet.
Title: Re: Possible log in to this forum with BTS id?
Post by: xeroc on January 14, 2015, 02:40:07 pm
Gamey has a working plugin running at bitnation.org or so ...


//edit: url: http://bitsharesnation.org/
Title: Re: Possible log in to this forum with BTS id?
Post by: islandking on January 14, 2015, 02:50:19 pm
You could always ask bitsapphire if they can add it to the forum. Gamey already has a plugin.
Title: Re: Possible log in to this forum with BTS id?
Post by: gamey on January 14, 2015, 04:15:11 pm
It is pretty much done but the plugin included a work-around for a bug that was in the wallet.  I am waiting for a new release of the wallet.  (or I could test the site off devshares I suppose.. ).  I wanted to remove that work-around in the plugin and have it as polished as possible.  I'll be messing with it over the next few days too as I want to wrap that project up but I'm waiting on a fixed wallet.  I also posted on the simplemachines forum for advice a couple days ago ..

So it is more or less completed, but it is a security plugin that does authentication so I've been quite slow and deliberate.  It sounds cool and all to throw it up but then if it was to start messing with people's SMF experience then that would not be good.  Also security breaches of the authentication type can't be rewound like a blockchain fix.  IMO always delete sensitive messages on the forum.
Title: Re: Possible log in to this forum with BTS id?
Post by: sudo on January 14, 2015, 04:57:20 pm
 +5%
Title: Re: Possible log in to this forum with BTS id?
Post by: abit on January 23, 2015, 01:28:18 pm
It is pretty much done but the plugin included a work-around for a bug that was in the wallet.  I am waiting for a new release of the wallet.  (or I could test the site off devshares I suppose.. ).  I wanted to remove that work-around in the plugin and have it as polished as possible.  I'll be messing with it over the next few days too as I want to wrap that project up but I'm waiting on a fixed wallet.  I also posted on the simplemachines forum for advice a couple days ago ..

So it is more or less completed, but it is a security plugin that does authentication so I've been quite slow and deliberate.  It sounds cool and all to throw it up but then if it was to start messing with people's SMF experience then that would not be good.  Also security breaches of the authentication type can't be rewound like a blockchain fix.  IMO always delete sensitive messages on the forum.
@gamey any update? New wallet has been released.  :)
Thanks.
Title: Re: Possible log in to this forum with BTS id?
Post by: sudo on January 23, 2015, 03:57:17 pm
 +5%
Title: Re: Possible log in to this forum with BTS id?
Post by: gamey on January 23, 2015, 08:03:13 pm
I've done most of the research for last few issues so I'll be finishing it up in the next few days (end of weekend). (It already is finished).. but..then last round of testing when it is code complete.

It was updated/tested for the latest wallet.

I do have one problem where apache is binding to localhost at the same port and preventing the wallet from connecting.  So it took me shutting down apache and waiting and then starting them up in order.  I have no clue why using a curl-php5  would do this.  I guess I don't understand tcpip ?  Regardless it isn't really acceptable because if the wallet dies, a wallet restart won't work because it fails to bind to that port.  I've read all the curl lib options etc and nothing makes sense except that I don't understand tcpip as well as I thought.  I doubt it'd be a problem if everything wasn't using localhost. 
Title: Re: Possible log in to this forum with BTS id?
Post by: btswildpig on January 23, 2015, 08:13:50 pm
I've done most of the research for last few issues so I'll be finishing it up in the next few days (end of weekend). (It already is finished).. but..then last round of testing when it is code complete.

It was updated/tested for the latest wallet.

I do have one problem where apache is binding to localhost at the same port and preventing the wallet from connecting.  So it took me shutting down apache and waiting and then starting them up in order.  I have no clue why using a curl-php5  would do this.  I guess I don't understand tcpip ?  Regardless it isn't really acceptable because if the wallet dies, a wallet restart won't work because it fails to bind to that port.  I've read all the curl lib options etc and nothing makes sense except that I don't understand tcpip as well as I thought.  I doubt it'd be a problem if everything wasn't using localhost.

what's the number of the port ?
Title: Re: Possible log in to this forum with BTS id?
Post by: gamey on January 23, 2015, 08:20:55 pm
I've done most of the research for last few issues so I'll be finishing it up in the next few days (end of weekend). (It already is finished).. but..then last round of testing when it is code complete.

It was updated/tested for the latest wallet.

I do have one problem where apache is binding to localhost at the same port and preventing the wallet from connecting.  So it took me shutting down apache and waiting and then starting them up in order.  I have no clue why using a curl-php5  would do this.  I guess I don't understand tcpip ?  Regardless it isn't really acceptable because if the wallet dies, a wallet restart won't work because it fails to bind to that port.  I've read all the curl lib options etc and nothing makes sense except that I don't understand tcpip as well as I thought.  I doubt it'd be a problem if everything wasn't using localhost.

what's the number of the port ?

57133.
Title: Re: Possible log in to this forum with BTS id?
Post by: abit on January 24, 2015, 12:59:18 am
I do have one problem where apache is binding to localhost at the same port and preventing the wallet from connecting.  So it took me shutting down apache and waiting and then starting them up in order.  I have no clue why using a curl-php5  would do this.  I guess I don't understand tcpip ?  Regardless it isn't really acceptable because if the wallet dies, a wallet restart won't work because it fails to bind to that port.  I've read all the curl lib options etc and nothing makes sense except that I don't understand tcpip as well as I thought.  I doubt it'd be a problem if everything wasn't using localhost.
I'm not sure if it's a curl-php5 problem.. Maybe set different ports for apache and the wallet will work.
Could you post your apache config files here?
And the command line you starting your wallet, and the config.json of your wallet?
And the code how you're using curl-php?
Reminder: don't set CURLOPT_LOCALPORT or set it to a different value in curl-php.
Title: Re: Possible log in to this forum with BTS id?
Post by: gamey on January 24, 2015, 01:56:02 am
I do have one problem where apache is binding to localhost at the same port and preventing the wallet from connecting.  So it took me shutting down apache and waiting and then starting them up in order.  I have no clue why using a curl-php5  would do this.  I guess I don't understand tcpip ?  Regardless it isn't really acceptable because if the wallet dies, a wallet restart won't work because it fails to bind to that port.  I've read all the curl lib options etc and nothing makes sense except that I don't understand tcpip as well as I thought.  I doubt it'd be a problem if everything wasn't using localhost.
I'm not sure if it's a curl-php5 problem.. Maybe set different ports for apache and the wallet will work.
Could you post your apache config files here?
And the command line you starting your wallet, and the config.json of your wallet?
And the code how you're using curl-php?
Reminder: don't set CURLOPT_LOCALPORT or set it to a different value in curl-php.

There are no ports for apache.  Just database settings that are fed into curl.  I'm not going to go through basic IT support but I will look at that setting.
...
Ahh wow.  I went through full list of curl options looking for that because my theory is that the local port is defaulting to the destination port which would match up the 4tuple if ports/ips. So I looked through settings and for whatever reason didn't see it.  I made a list of possible curl options to inspect but I missed the one I needed.  I suspect the above option will fix it as it was what I was looking for to begin with, so thank you for your input !
Title: Re: Possible log in to this forum with BTS id?
Post by: gamey on January 24, 2015, 01:59:39 am
Actually the reason I didn't find that is because you linked me to C code.  My code is the standard php curl lib that you get when you install php5-curl or whatever it is.

It uses easybitcoin which is a real simple php lib that uses __call or whatever it is to overload the class into rpc calls.  You can google and find it.  If I remember I'll grep through file system for that port #, but.. its just a random port.
Title: Re: Possible log in to this forum with BTS id?
Post by: abit on January 24, 2015, 04:16:16 am
CURLOPT_LOCALPORT has a random value by default. I checked the easybitcoin code and didn't find the option, so it should be ok.

Are you sure the port is bond by apache, but not the wallet itself (or previous instance of the wallet)? Is the problem only happens when restarting the wallet? In my Linux box, after a wallet quits, the ports will still be unavailable for some time (2 minutes by default), with some connections remain 'TIME_WAIT' state. You can check it with 'netstat -an | grep YOUR_PORT'. I don't know if it's a bug of the wallet or it's a feature of Linux though (whether the wallet properly closes all connections before quit). If it's a feature of Linux, it's possible to tweak via 'sysctl' utility:
Code: [Select]
sysctl net.ipv4.tcp_tw_reuse = 1
sysctl net.ipv4.tcp_tw_recycle = 1

EDIT:
Be careful while tweaking kernel options. It may cause other problems occasionally.

EDIT again:
If you have iptables/netfilter loaded into the kernel, you may have interest to try:
Code: [Select]
sysctl net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 1
It means every connection will stay in 'TIME_WAIT' state for only one second. Again, be careful.

Another solution could be wait for 2 minutes after the wallet quits, before a restart.
Or change the listening port number every time (and let the php program know it).

BTW does anybody know whether it's necessary for the wallet to check connections in TIME_WAIT state before bind/listen to the port?
Title: Re: Possible log in to this forum with BTS id?
Post by: gamey on January 24, 2015, 04:46:42 am
CURLOPT_LOCALPORT has a random value by default. I checked the easybitcoin code and didn't find the option, so it should be ok.

Are you sure the port is bond by apache, but not the wallet itself (or previous instance of the wallet)? Is the problem only happens when restarting the wallet? In my Linux box, after a wallet quits, the ports will still be unavailable for some time, with some connections remain 'TIME_WAIT' state. You can check it with 'netstat -an | grep YOUR_PORT'. I don't know if it's a bug of the wallet or it's a feature of Linux though (whether the wallet properly closes all connections before quit). If it's a feature of Linux, it's possible to tweak via 'sysctl' utility:
Code: [Select]
sysctl net.ipv4.tcp_tw_reuse = 1
sysctl net.ipv4.tcp_tw_recycle = 1

EDIT:
Be careful while tweaking kernel options. It may cause other problems occasionally.

I do appreciate your indepth checking because I'm a bit of a loss how to fix it properly... but I was thinking this over dinner and I'll probably just leave it alone after recreating it again and making sure.  I need to ask itnom if the wallet will run on the same machine.  I imagine it won't, but I really don't know. 

Yes it is apache. I use a command lsof to match up open file handles to processes.  There is another problem where the wallet had the ports locked up by the OS after quitting but it isn't the problem.  My problem has only happened once, I just realized how annoying it is because even when I stopped apached the port was not immediately available.  So if the wallet dies and tries to bind to that port and there is this weird race condition where the easybitcoin php lib keeps it from binding... then wallet can never start. THere is also a chance that the options for the socket creation in the wallet constrain it too much. It has to be fixed in php but if there were other suggestions to put in the readme file.. that could be considered a solution, but this is a php project that interacts with RPC and SMF.

I have a list of php options that might would fix it in a different manner, but it really isn't a show stopper.  Just a bit puzzling.  Anyway, it will likely just be made an issue on github and i'll consider it done.
Title: Re: Possible log in to this forum with BTS id?
Post by: abit on January 24, 2015, 05:00:58 am
Yes it is apache. I use a command lsof to match up open file handles to processes.  There is another problem where the wallet had the ports locked up by the OS after quitting but it isn't the problem.  My problem has only happened once, I just realized how annoying it is because even when I stopped apached the port was not immediately available.  So if the wallet dies and tries to bind to that port and there is this weird race condition where the easybitcoin php lib keeps it from binding... then wallet can never start. THere is also a chance that the options for the socket creation in the wallet constrain it too much. It has to be fixed in php but if there were other suggestions to put in the readme file.. that could be considered a solution, but this is a php project that interacts with RPC and SMF.

I have a list of php options that might would fix it in a different manner, but it really isn't a show stopper.  Just a bit puzzling.  Anyway, it will likely just be made an issue on github and i'll consider it done.
Looks like the cause of your problem is out of my knowledge.. Wish you good luck anyway.
Title: Re: Possible log in to this forum with BTS id?
Post by: sudo on March 23, 2015, 01:23:16 am
Use bitshares id  login authentication technology has matured or not?
Title: Re: Possible log in to this forum with BTS id?
Post by: BunkerChainLabs-DataSecurityNode on March 23, 2015, 02:20:14 am
Use bitshares id  login authentication technology has matured or not?

With some API programming there is enough existing code to make it happen.

It's ultimately up to the delegate bts:bitsapphire though.. they are the ones that run this forum. So it's up to them to make improvements and upgrades.
Title: Re: Possible log in to this forum with BTS id?
Post by: jsidhu on March 23, 2015, 05:23:16 am
Use bitshares id  login authentication technology has matured or not?
Have you seen my drupal and prestashop demos?

Next step is to include more profile data and also somehow try to see if its possible through a webwallet.. Or if not if its possible to doit in the current browser without opening new one
Title: Re: Possible log in to this forum with BTS id?
Post by: gamey on March 23, 2015, 06:03:17 am

I finished it, then had problems with the wallet crashing.  I think manually unlocking and leaving the wallet unlocked is a better solution which may enable it to work.  I also now need to remove the robohashes from the code now.  Then once that is done, Bitsapphire can install it if they wish.  I planned on finishing this out this week, regardless of whether the wallet crashes or not. 

SMF has a hack of a plugin system.  Literally there are just places in the code where you hook into.  You add buttons by regular-expressions, etc.  Things like Drupal etc would likely be much simpler as they're a lot more architected with plugins in mind.

The problem in this thread seemed to disappear, so I am not sure what was going on.
Title: Re: Possible log in to this forum with BTS id?
Post by: jsidhu on March 23, 2015, 06:55:20 pm

I finished it, then had problems with the wallet crashing.  I think manually unlocking and leaving the wallet unlocked is a better solution which may enable it to work.  I also now need to remove the robohashes from the code now.  Then once that is done, Bitsapphire can install it if they wish.  I planned on finishing this out this week, regardless of whether the wallet crashes or not. 

SMF has a hack of a plugin system.  Literally there are just places in the code where you hook into.  You add buttons by regular-expressions, etc.  Things like Drupal etc would likely be much simpler as they're a lot more architected with plugins in mind.

The problem in this thread seemed to disappear, so I am not sure what was going on.

Yup it was pretty fun to do... now I got loginradius who's thinking about integration of bitshares login... talking to CEO, got myself an unlimited development license :P we'll see how it goes.

Idea is that you would install a loginradius plugin for your system (hopefully one for SMF) and off you go.
Title: Re: Possible log in to this forum with BTS id?
Post by: gamey on March 23, 2015, 07:08:06 pm

I finished it, then had problems with the wallet crashing.  I think manually unlocking and leaving the wallet unlocked is a better solution which may enable it to work.  I also now need to remove the robohashes from the code now.  Then once that is done, Bitsapphire can install it if they wish.  I planned on finishing this out this week, regardless of whether the wallet crashes or not. 

SMF has a hack of a plugin system.  Literally there are just places in the code where you hook into.  You add buttons by regular-expressions, etc.  Things like Drupal etc would likely be much simpler as they're a lot more architected with plugins in mind.

The problem in this thread seemed to disappear, so I am not sure what was going on.

Yup it was pretty fun to do... now I got loginradius who's thinking about integration of bitshares login... talking to CEO, got myself an unlimited development license :P we'll see how it goes.

Idea is that you would install a loginradius plugin for your system (hopefully one for SMF) and off you go.

Yea Drupal is my go to CMS and what I base projects off.  Wordpress is meh.  Problem with Drupal is trying to figure out what version you wish to install... 6,7 or 8. 

SMF literally has you add functions that are called at certain points in the code.  Thats where you modify things.  The registration system is very monolithic.  Long functions that do a ton of things.  If you replace the function you are risking breaking things in security updates or version upgrades.

Title: Re: Possible log in to this forum with BTS id?
Post by: jsidhu on March 23, 2015, 08:01:16 pm

I finished it, then had problems with the wallet crashing.  I think manually unlocking and leaving the wallet unlocked is a better solution which may enable it to work.  I also now need to remove the robohashes from the code now.  Then once that is done, Bitsapphire can install it if they wish.  I planned on finishing this out this week, regardless of whether the wallet crashes or not. 

SMF has a hack of a plugin system.  Literally there are just places in the code where you hook into.  You add buttons by regular-expressions, etc.  Things like Drupal etc would likely be much simpler as they're a lot more architected with plugins in mind.

The problem in this thread seemed to disappear, so I am not sure what was going on.

Yup it was pretty fun to do... now I got loginradius who's thinking about integration of bitshares login... talking to CEO, got myself an unlimited development license :P we'll see how it goes.

Idea is that you would install a loginradius plugin for your system (hopefully one for SMF) and off you go.

Yea Drupal is my go to CMS and what I base projects off.  Wordpress is meh.  Problem with Drupal is trying to figure out what version you wish to install... 6,7 or 8. 

SMF literally has you add functions that are called at certain points in the code.  Thats where you modify things.  The registration system is very monolithic.  Long functions that do a ton of things.  If you replace the function you are risking breaking things in security updates or version upgrades.

Yea i ended up supporting both 6 and 7.. drupal 8 is out? I like prestashop, magento and xcart aswell.. i did some other work for prestashop too regarding bitasset price updating its pretty cool to use too.

Title: Re: Possible log in to this forum with BTS id?
Post by: sudo on April 03, 2015, 06:08:20 am
is that ready?

http://cryptosmith.info/  is ready to  login  with bts id!!!!!!!!!!!!!!!!!!!!

http://cryptosmith.info/index.php?controller=authentication&back=history
Title: Re: Possible log in to this forum with BTS id?
Post by: jsidhu on April 03, 2015, 07:04:49 am
is that ready?

http://cryptosmith.info/  is ready to  login  with bts id!!!!!!!!!!!!!!!!!!!!

http://cryptosmith.info/index.php?controller=authentication&back=history

Yup i integrated the prestashop social plugin with bitshares login
Title: Re: Possible log in to this forum with BTS id?
Post by: kenCode on April 03, 2015, 09:53:22 am
is that ready?
http://cryptosmith.info/  is ready to  login  with bts id!!!!!!!!!!!!!!!!!!!!
http://cryptosmith.info/index.php?controller=authentication&back=history
Yup i integrated the prestashop social plugin with bitshares login

 +5% +5% +5%
 
Is there any way we could tweak the plugin, create a Chrome extension out of it? One that would retain the private key locally only of course,  and allow us to start surfing .p2p websites? I'd love to see wallet.bitshares.p2p or even www.bitshares.dac ...
https://bitsharestalk.org/index.php?topic=15283.msg197053#msg197053
 
Title: Re: Possible log in to this forum with BTS id?
Post by: jsidhu on April 03, 2015, 03:42:21 pm
is that ready?
http://cryptosmith.info/  is ready to  login  with bts id!!!!!!!!!!!!!!!!!!!!
http://cryptosmith.info/index.php?controller=authentication&back=history
Yup i integrated the prestashop social plugin with bitshares login

 +5% +5% +5%
 
Is there any way we could tweak the plugin, create a Chrome extension out of it? One that would retain the private key locally only of course,  and allow us to start surfing .p2p websites? I'd love to see wallet.bitshares.p2p or even www.bitshares.dac ...
https://bitsharestalk.org/index.php?topic=15283.msg197053#msg197053
Its usimg protocol like oauth... Are therr any oauth extemsions (facebook login) for chrome? If so it would be easy...
Title: Re: Possible log in to this forum with BTS id?
Post by: kenCode on April 03, 2015, 05:49:18 pm
Its usimg protocol like oauth... Are therr any oauth extemsions (facebook login) for chrome? If so it would be easy...

Cool, let's do it!! I've posted a Poll here: https://bitsharestalk.org/index.php?topic=15461.0