Diaspora API Dev Progress Report 28

Today is a momentous day in the Diaspora API development saga.  Today we have completed primary development of the API, the unit tests, and the external test harness.  There are still two code reviews between that and the real code review for integration into the main development branch, but all of the major work is complete.  What does that mean exactly?


Diaspora API Dev Progress Report 27

Boy are we really coming down the home stretch now!  All of the scopes are implemented in every API endpoint now with their corresponding tests to confirm that the permissions are working correctly.  The most difficult of those, I thought, was the Streams, again.  After beating my head against a rock a lot yesterday I put the whole project down for the day and then picked it up today.  After warming up on the other endpoints I started working my way through getting Streams working such that it could filter private data.  After a bit of fumbling I finally got a relatively simple solution to the problem and got all the tests passing correctly.


Diaspora API Dev Progress Report 26

It’s been almost a week since there’s been an update on the API.  I’ve been busy with other things and travel so it didn’t get as much focus as I would have liked to have given it.  However there has been some progress.  Thanks to Frank’s help we’ve been able to get all of the side branches merged into the core API branch so that we are now coming down the home stretch on getting it ready for integration.  The first order of business for that is getting the OpenID security stuff squared away.  I’m still working on understanding that better and the more I go back to it and work with it here the better that looks.  There is still the question of the "refresh token" workflow but work has been done on it so if anything it’s a small tweak thing or a documentation thing versus a from scratch development thing.  Even in the event that it was a from scratch thing with the code base I have and the examples I mentioned before it shouldn’t be a huge effort to get that working.  Most of the security work is therefore integrating in the much more fine grained security scopes which Senya has been working to hone.


Facebook Messenger Alternatives Redux (Federated and Non-Federated)

While I post mostly on Fediverse platforms like Diaspora and Mastodon, and am focusing my development efforts there, the instant messaging accessibility of Facebook Messenger has been illusive. I tried Wickr and it’s okay but not the most user friendly. It’s claim to fame is the messages only go from the participant to the receiver without a server between except for authentication. That makes the flow clunky, to say the least.  Which is why leaving Facebook has been one of my least successful aspects.    I wanted to explore other options and in the last week I pulled the trigger and actually did it.


Diaspora API Dev Progress Report 25

With the documentation changes wrapped up, but holding off on PR’s until things solidify up a bit more from the code scrub process, it was time to move on to the OpenID deep dive and review.  Up until now I’ve been working with an authorization workflow that required me to request a new token ever 24 hours and for the user to authenticate it.  I wasn’t sure how much of that was because of the flow I chose or intrinsic to how it was coded up.  As I continued to go over the OpenID documentation and other articles on the process I just couldn’t get it working.  It was then clear to me that what I needed was an example to help me.

Luckily Nov Matake created some example projects to go along with his OpenID gems, one for the OpenID Connect Provider (the server side) and one for the OpenID Relying Party (the app side).  I figured with that everything would be good to go.  After all this was the same code he had running up on Heroku but I wanted to see the nitty gritty details and set it up on both sides since I was going to need to do that with Diaspora and the test harness, or any other API use case I may be interested in.  As I had come to find out quickly these projects have never been updated.  They still rely on old versions of Ruby and Rails.  Instead of trying to downshift everything to these versions I decided to fork the projects and get them running under Ruby 2.4+ and Rails 5.  Unfortunately that derailed my entire Diaspora development effort for the day. The upside is that the community will have modern versions of these projects to use.  I intend to polish them up a little more and then issue a PR back to the original project.  My versions however can be found on my GitHub profile with the Connection Provider here and the Relying Party here.

In the process of doing these upgrades I was able to learn a lot more about porting Ruby code up from older versions.  I also got a much better understanding of some OpenID flows.  I’m going to use that to continue to move forward on the review of the implementation in the API and looking at client side implementation details.  Because of the complexity of that whole process I think that’s probably something developers can use a good amount of help for via blog posts and examples.

In Summary:

  • Documentation updates are complete but waiting for PRs for after the code scrub
  • Updated Ruby on Rails OpenID examples from Nov Matake to work under Rails 5

You can follow the status dashboard at this Google Sheet as well.

Picture of Me (Hank)


Updates (124)
Journal (113)
Daily Updates (84)
Software Engineering (71)
Commentary (65)
Methodology (56)