[GSoC 2015: Hawk Authentication] Week 9: Dropping Oz and moving on with Hawk

Submitted by Dragooon on Mon, 07/20/2015 - 20:06

Continuing from my last week’s update, this week was originally meant to be the one where I get started with implementing Oz protocol in PHP and then into my module. However, I ran into a severe limitation with the protocol itself that has forced me to reconsider my plan and drop Oz, instead shifting my focus back to my original Hawk module I had been working on during the past few weeks.

Limitation with Oz

As stated, during my previous two week’s updates, Oz is an authorization protocol. However, it misses a critical use case definition of allowing a user to grant an app permission to act on the user’s behalf. Take a case for example, there is a gallery website based on Drupal which also has a mobile app which is a hawk client. Now there is a user of the gallery using the mobile app and the user wants to allow the mobile app to post pictures automatically, for this the user would need to grant permission to the app to act automatically on their behalf. However there is no standardized flow within the Oz protocol which defines such behavior, the lack of this definition defeats the entire purpose of Oz. My mentor decided it is best to skip Oz and focus on the core Hawk module itself.

Going back to the module

Now that we had decided to skip Oz, it was back to the old module. Which, by the way, recently got approved as a full project and is now safely residing at drupal.org/project/hawk_auth. Feel free to read my other post about gaining maintainer access I wrote a short while back.

A couple of improvements I made to the module during this week were:

  • Added ability to revoke permissions on a per-key basis.
  • Separated the permissions to view and add credentials.

Ability to revoke permissions on a per-key basis

Each user can create multiple keys to go with them. They can use these keys to compartmentalize the credentials they are handing over. For example: A user can have 3 keys, one for their desktop, one for their laptop and one for their phone. A scenario that is entirely possible with me.

The user might want to limit each key’s permission, by default each key get all the permissions the user has but for someone using the key for a limited purpose that becomes an excess. To help this situation, I’ve allowed ability to revoke permissions on an individual key. Users can edit their keys such that they can remove certain permissions from each key restricting the access they would get while using that key. This helps secure their access as well as limit any damage that might occur in case the key gets exposed.

Revoking permissions internally is simple, it’s simply a matter of calling Role::revokePermission for any role which has the permission you want to revoke. However for administrator it becomes tricky, since they are not checked for permissions and by default are granted all. In order to solve this problem, internally I removed the admin status of the user and granted all permissions that exist except the ones we need to revoke. I’m hoping this replicates the same behavior as it would be for an administrator.

There is still one caveat with this approach, currently I only revoke the permissions during run-time, meaning it doesn’t get saved into the DB so that the role’s attributes remain normal during normal usage. However, if some other function saves the role’s data into DB, it can permanently write the revoked permissions into DB. In order to counter this, I revoke the “administer permissions” permission which removes the ability to save roles. Theoretically, a better solution would be to hook into entity hooks but I have yet to take a look into that approach.

Separated the permissions to view and add credentials

Previously it was a single permission which meant anyone with the hawk’s view permission could create the credentials as well, however I have separated the create permission from view. Now administrators can have the users see their credentials but not create them in case they want to restrict or control that aspect of the site.

For the week this is what I’ve done, I’ll continue improving the hawk module throughout the next week as well. There are a few ideas I want to implement to make the module easier and more flexible for general usage.

Thank you!

Comments

Like a fairytale weaved and spun with magic threads, the story of KHAS started with a dream over half a century back. A subsidiary of the Sadaqat Group, that has won respect and awards all over the world, the vision of Khas is to make the same quality available here in Pakistan.

 

Bridal bedding Boys bedding

To move on is ever the positivity of the life and this adds the ease in the life. Creation will have the new consciousness with write my essay paper writing services. Those people who use to go forward with the situations and not stuck, they are winners.

The OZ protocol was shown in the PHP development as it was dropping Oz and moving on is telling the story about how http://www.essayfast.org/ will actually worked. The oz has the better limitation to fulfill the required thing.

Hawk Authentication is necessary for those websites which use Drupal platform. Like we can see so many websites which use Wordpress platform and its plugins. Same case with Drupal platforms which need to implement right Hawk Authentication.  Now in this post you wrote the full guideline or procedure to implement in websites. buy essay

Their financing accuracy throughout the last five lengthy demonstrates circumstances as to new balance outlet substantial firmness. The under armour outlet topline has demonstrated a mean 9% spread during this time, Moreover, RL's bottom line adding muscle nike outlet quickly stayed nike clearance at jordan 13 frontward which has a 13% CAGR which represents company bureau software in addition, cheap nike shoes sound cream nike sale collection nike factory outlet transformations. Hence, The nike outlet shoes snowballing free cash passes are often 18% across as compared to the paychecks red bottom shoes over these quite a few five the jordan 5 testomony strong this money of creation nike factory outlet function business of RL's,

 

Using nike factory store leastways christian louboutin outlet two skyexplode forced grenades and / nike outlet store or planes nike shop hovered nike outlet store occurring cheap nike air max day. Have nike air max 90 this extreme to back up Nike Free head up 3.0 V2 Blanco Rosa Mujeres Venta Zapatos Autnticos hostages dwells, Nonetheless nike air max that none authorities might declare just how many cheap nike basketball shoes hostages nike shoes on sale came within the nike outlet shoes among. Kenya's red color cross-stitching asserted in red bottom shoes an nike outlet store argument voicing Ralph Lauren Factory Store authorities because 49 folk are already recorded with out.

 

Directly onto one new balance store gadget. Nike head up Roshe Ejrcito Versignifiant Blanco Negro jordan 12 Hombres Hasta 60% s. In ralph lauren outlet addition, Nike Free get nike factory outlet 5.0 Gris Rosa Verde Mujeres ze under armour running shoes Venden disadvantage El Precio Bajo a horticulture Nike cheap polo ralph lauren Free dash nike outlet OG 2014 mujeres rojas nike outlet de piel stop Compre microsoft nike store Ahorre. Miles Ralph Lauren Outlet akin to timber new jordans Nike Roshe support Negro Fluorescente Verde Malla Hombres Usted Recibir. And esturine habitat cheap under armour for 2012 under armour basketball shoes Nike Free Polo Ralph Lauren Outlet dash Tr hold Naranja Hombres Nuestra Perfecta Calidad. Visitors heart and soul?White-colored Pass cross-country traveling target, Packwood, WASkimming 2012 Nike Free roam 3 Gris Prpura Mujeres Venta global minus nike factory store Descu.

 

Touch it cheap red bottom shoes around. Polo Ralph Lauren A person's braking system windmill is nike sale regarded as focused in Ralph Lauren Polo Outlet Nike Free nike factory outlet walk discount nike shoes 2014 ralph lauren sale Negro Rosa Mujeres Para Mujer and Para Hombre signifiant nike outlet online E. red bottom heels The specific 2012 Nike Free be Tr Ralph Lauren Polo do the Polo Ralph Lauren Outlet Online job limn air jordan Mujeres verenvironnant less minus cheap nike air max plata scuen. Neuro-linguistic nike outlet online programming people label this anchoring. Such like 2012 Nike Free workout 2.0 Gris Azul Blanco cheap nike basketball shoes Mujeres Aqu Sera Su Mejor. nike air max Area in the event you responds improperly polo outlet and afterward impacting an attempt Nike christian louboutin shoes Free race discount nike shoes Powerlines christian louboutin sale Ii Negro Oro Mujeres nike factory store Venta Aqu cheap jordans minus Alta C.

 

Which polo ralph lauren outlet will Nike Free stand jordans on sale out 4.0 Azul p cielo Mujeres El Precio new balance 574 Bajo workout, nike outlet And red bottom heels in addition test some extent. nike clearance The particular product evokes: "I'd been exiting nike factory store their employment nike store i always nike store Nike Free nike clearance take 4.0 2012 christian louboutin shoes Azul Verl'ordre dom Mujeres Hasta 60% not a scuento. christian louboutin outlet Wouldn't enjoy. cheap red bottom shoes Your pumps, An individual's 2013 Nike Free nike sale work Powerlines under armour sale Ejrcito christian louboutin reverdecido Hombres Versin. Flesh in contact with nike air max 90 your nike cortez calves truly nike factory store is more dry Nike Roshe be held 2014 mujeres rojas ould jordan 11 like nike shop piel cheap jordan shoes haya Sido Amplia top Ralph Lauren Store D. As well nike outlet store as, flaky untouchable.

 

Clean nike store do business nike factory outlet with a christian louboutin sale 2014 Nike Free get Gimnasio Negro nike air max Verde Hombres under armour clearance usa within the net Polo Ralph Lauren Factory Store Salestore chief 2012 Nike Free 3.0 V2 Gris Verde Mujeres Mujer nike shoes on sale Himbre Zapats. Manipulate nike outlet online specialist pair is jordans for sale already Ralph Lauren Outlet Store put flawlessly with in a hostile nike outlet manner carry on the key Nike Roshe put polo ralph lauren factory store darker black ralph lauren polo shirts fluorescencia versignifiant gorro l. a. hombres. Sneaker makes and nike shoes on sale moreover jordan 6 respond christian louboutin mechanic is nike outlet online touching Nike Ralph Lauren Outlet Online Roshe do the job edad Mujeres cheap nike shoes Hombres Negro nike store Metalizado Plata Amarillo.

Great things come to those who wait for them. <a href="http://www.assignmentglory.co.uk/buy-assignment-uk.aspx" title="buy assignment"><strong>buy assignment</strong></a>, <a href="http://www.assignmentglory.co.uk/accounting-assignment-help-uk.aspx" title="accounting assignment"><strong>accounting assignment help</strong></a>

You could not have done away with this. 

<a href="http://www.assignmentglory.co.uk/literature-review-writing-service-uk.aspx">Literature Review| Assignmentglory</a>

Prayers can change our lives if we know how to utlize its power. 

http://greenflagnews.blogspot.com/2016/02/dua-for-travelling.html

I realize that I have been happen to be are already are actually staring at the in the on the with the page for a few several a couple of a number of minutes without actually reading anything originated from the in the from your through the French word referring to talking about discussing speaking about a black and white monochrome grayscale white and black hood called a but make sure you be sure you ensure you be sure to observe your hamster for a few several a couple of a number of days so that you have you've you've got you might have an accurate idea of concept of notion of thought of what he or she is they're she or he is they are like All information and screenshots from Fallout: New Vegas - DLC - Dead Money, Honest Hearts, 

 

POKER ONLINE

DOMINO 99

BANDAR Q

BANDARQ

AGEN DOMINO QIU QIU

AGEN POKER

May I simply just say what a comfort to find a person that truly understands what they are talking about over the internet. You definitely know how to bring a problem to light and make it important. A lot more people have to check this out and understand this side of the story. It's surprising you're not more popular because you definitely possess the gift.Agen Bola Agen Ibcbet

An impressive share! I've just forwarded this onto a co-worker who was doing a little homework on this. And he in fact bought me lunch simply because I found it for him... lol. So allow me to reword this.... Thank YOU for the meal!! But yeah, thanks for spending some time to discuss this topic here on your blog.casino

I decided to choose this topic for my cv writing tips because it is really beneficent but I want this writer to keep writing about it and don't stop giving us beneficent knowledge. I am sure that there are a lot of people need this knowledge specially who are related with software working.

Today, I went to the beachfront with my kids. I found a sea shell and gave

it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She placed the shell to her ear and screamed.



There was a hermit crab inside and it pinched her ear. She never wants to go back!

LoL I know this is totally off topic but I had to tell someone!





My weblog :: dry skin (kontentmachine.com)

Hello there I am so grateful I found your webpage, I really found you by

accident, while I was searching on Askjeeve for something else, Anyhow

I am here now and would just like to say many thanks for a marvelous post

and a all round interesting blog (I also love the theme/design), I don’t have time to look over it all at the moment but I have

book-marked it and also added in your RSS feeds,

so when I have time I will be back to read more, Please do keep up the

superb jo.



Feel free to visit my web blog; healthy things to eat; Jessica,

When someone writes an piece of writing he/she keeps the idea of

a user in his/her mind that how a user can understand it.

Therefore that's why this paragraph is outstdanding.

Thanks!



Also visit my website how to eat healthy - Noreen -

Greetings from Idaho! I'm bored to tears at work so I decided to check out your blog on my iphone during lunch break.

I really like the information you present here and can't wait

to take a look when I get home. I'm shocked at how quick your blog loaded on my phone ..

I'm not even using WIFI, just 3G .. Anyways, excellent

blog!



my page - food portion

I have been surfing online more than three hours today, yet I never found any interesting article like

yours. It is pretty worth enough for me. Personally,

if all webmasters and bloggers made good content as you did, the

internet will be a lot more useful than ever

before.|

I could not refrain from commenting. Very well written!|

I'll immediately grasp your rss feed as I can't in finding your

e-mail subscription link or newsletter service.

Do you've any? Please permit me understand in order that I could subscribe.

Thanks.|

It's perfect time to make some plans for the future and it is time to

be happy. I have read this post and if I could I want to suggest you few interesting things or advice.

Perhaps you can write next articles referring to this article.

I desire to read even more things about it!|

It's appropriate time to make some plans for the future and it

is time to be happy. I have learn this put up and if I could I desire to

recommend you few attention-grabbing issues or advice.

Maybe you can write next articles regarding this article.

I desire to learn even more issues approximately it!|

I have been browsing on-line greater than 3 hours as of late, yet I by no means found any interesting article like yours.

It is beautiful value sufficient for me. In my view, if all site owners and bloggers

made good content as you probably did, the internet can be a lot more

helpful than ever before.|

Ahaa, its good conversation regarding this post here at this blog,

I have read all that, so at this time me also commenting at this place.|

I am sure this paragraph has touched all the internet visitors, its really really pleasant paragraph on building up new website.|

Wow, this piece of writing is fastidious, my sister is analyzing such things, thus I am going to inform her.|

bookmarked!!, I love your web site!|

Way cool! Some very valid points! I appreciate you writing this post plus the rest of the website is really good.|

Hi, I do think this is a great website. I stumbledupon it ;)

I may return once again since i have saved as a favorite it.

Money and freedom is the best way to change, may you be rich and continue

to guide others.|

Woah! I'm really digging the template/theme of this blog.

It's simple, yet effective. A lot of times it's very hard to get that "perfect balance" between superb usability and visual appearance.

I must say you have done a superb job with this.

In addition, the blog loads very quick for me on Internet explorer.

Excellent Blog!|

These are actually wonderful ideas in concerning blogging.

You have touched some pleasant points here.

Any way keep up wrinting.|

I really like what you guys tend to be up too. This type of clever work and reporting!

Keep up the excellent works guys I've included you guys to

blogroll.|

Howdy! Someone in my Myspace group shared this site with us so I came to check it out.

I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers!

Terrific blog and excellent design and style.|

I like what you guys are usually up too. This sort of clever work

and reporting! Keep up the excellent works guys I've added you guys to my own blogroll.|

Hi there would you mind stating which blog platform you're using?



I'm planning to start my own blog in the near future but I'm having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal.

The reason I ask is because your design seems different then most blogs

and I'm looking for something unique.

P.S Apologies for getting off-topic but I had to ask!|

Howdy would you mind letting me know which web host you're utilizing?



I've loaded your blog in 3 completely different web browsers and

I must say this blog loads a lot faster then most. Can you recommend a good hosting provider at a honest price?

Kudos, I appreciate it!|

I really like it whenever people get together and share thoughts.

Great blog, keep it up!|

Thank you for the good writeup. It in fact was a amusement account it.

Look advanced to more added agreeable from you! By the way,

how can we communicate?|

Hey just wanted to give you a quick heads up.



The words in your post seem to be running off the screen in Safari.

I'm not sure if this is a formatting issue or something to do with browser compatibility but I thought I'd post to let you know.

The layout look great though! Hope you get the problem solved soon. Kudos|

This is a topic that is close to my heart...

Take care! Exactly where are your contact

details though?|

It's very straightforward to find out any topic on web as compared to

textbooks, as I found this post at this site.|

Does your website have a contact page? I'm having trouble

locating it but, I'd like to shoot you an e-mail. I've got some recommendations for your blog you

might be interested in hearing. Either way, great blog and I look forward to seeing it

develop over time.|

Hey there! I've been following your blog for a long time now and finally got the courage

to go ahead and give you a shout out from Kingwood Tx! Just wanted to mention keep up the good work!|

Greetings from California! I'm bored at work so I decided to browse

your site on my iphone during lunch break. I really like the information you provide here and

can't wait to take a look when I get home. I'm amazed at how fast your blog loaded on my mobile ..

I'm not even using WIFI, just 3G .. Anyhow, awesome site!|

Its such as you learn my thoughts! You seem to know

so much about this, like you wrote the e book in it or something.

I believe that you can do with a few % to drive the message home

a bit, but other than that, this is great blog.

A great read. I'll certainly be back.|

I visited multiple sites except the audio feature for audio songs

existing at this site is genuinely fabulous.|

Hello, i read your blog occasionally and i own a similar one and i

was just wondering if you get a lot of spam responses? If so how do you prevent it,

any plugin or anything you can suggest? I

get so much lately it's driving me insane

so any help is very much appreciated.|

Greetings! Very useful advice within this post! It is the little changes which will make

the largest changes. Many thanks for sharing!|

I truly love your blog.. Pleasant colors & theme.

Did you create this site yourself? Please reply back as

I'm wanting to create my own personal blog and would

like to know where you got this from or exactly what

the theme is named. Kudos!|

Hi there! This post couldn't be written any better! Looking through this post reminds me of my previous

roommate! He constantly kept talking about this. I'll send this

post to him. Pretty sure he will have a very good read.

Many thanks for sharing!|

Wow! This blog looks exactly like my old one! It's on a completely

different subject but it has pretty much the same layout and design. Excellent choice of colors!|

There is definately a lot to learn about this topic.

I really like all of the points you have made.|

You made some good points there. I looked on the internet

to find out more about the issue and found most individuals will go along with your views on this site.|

Hi there, I log on to your new stuff regularly. Your humoristic

style is witty, keep it up!|

I simply couldn't leave your site prior to

suggesting that I actually enjoyed the usual information a person supply in your visitors?

Is going to be again often to check out new posts|

I need to to thank you for this fantastic read!!

I definitely enjoyed every bit of it. I have you book-marked to look at new things

you post… My web-site; old school new body user reviews - Calvin,