Cubbyhole Response Wrapping

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *

Already have an account? Sign In »

4 hours 53 minutes
Video Transcription
Welcome back in this video, we're going to talk about cubbyhole response wrapping technique.
So what I mean by response were happening.
I'm specifically referring to the method for securely distributing tokens in the concept of secure introduction. Right. If you step back and you think about where does this old process start? Right. In order to interact with vault, you need a token. In order to get a token, something has to happen. So if you have
processes and servers,
services or servers running out there, whether it's in the cloud on Prem and they need to retrieve information from vault, they need a token. Well, how did they get that token in the first place? There's a few different ways that problem and that dilemma is called secure introduction, Right? How do we get the whole process and bootstrapped going? How can we securely get them? The token
and response wrapping is one of the mechanisms to do that we're going to be doing is creating a single use token that has a very short time to live very short. We're talking hopefully in seconds. You have to think about what is the client that needs to be used in this token. And how quickly can he respond
with the maximum response time
that we wanna wait until we raise concerns that maybe the client itself isn't responding? Maybe the token that we provided over these insecurities sandals has been compromised in some way, right? So we want to stay on top of these things. We get a very short time to live token. And then that token itself. It wraps a secret
which could itself be another access token
that has a little longer time to live for more continued activities.
It could also be another secret in itself on, and we'll get into those examples and later in this module. And then finally, we're giving this wrapped
token over to the application, the service, the individual, and then they go through the process of unwrapping it quickly, right, because it's going to expire in a very short order and form. So this provides some benefits in terms of, um,
the transmitted information across the wire. It itself is not a secret.
Rather, it's a rapping, So it's kind of like a pointer or an indirect reference to a secret. And we can really detect if a single party unwraps a token cause it's a single use token. So whenever it's used, we know it's been used in
it cannot be reused again to obtain whatever information is wrapping, and the really short lifetime of this token that were transmitting in this process.
It limits our secret vulnerability right that the period of time in which we are exposed.
So let's hop over to the command line
start of the vault server
first thing we want to do is set up our scenario in which we're gonna exercise this cubbyhole response wrapping paradigm. And what I want to do is, I want to create a policy here. So in the the repository with materials for this course, you could see that I've included a gadget
policy, and it's the same one that we used in the prior module talking about access management. And so what I want to do here is I'm going to go ahead and write this policy to the get user policy to my vault server,
and with that created, let's make a secret
that is going to be used for pertaining to the gadgets going to be given toe. James Bond Let's say he's on the Goldfinger mission. In there was a very famous gadgets, the the laser beam that even Austin Powers makes reference to.
So let's, uh, say, Hey,
James Bond, watch out for the Super Laser.
So in this fictitious scenario with our fictitious James Bond, let's assume that he forgot his user name and passed. So somehow he needs to get information about the gadget used to get the name of the gadget needs to access those secrets. He can no longer provide his user name and password, which would then provide him with an authentication token.
Somehow, we need to get him an authentication token that will provide him the rights
to access that information in the vault. This is a great place to take advantage of the wrapping situation, and what we can do is we can generate a token for James Bond using the token create. We're going associate that with the gadget user policy, giving him the rights to access and read the secrets
at that aforementioned location of the gadget,
and then we're gonna say rap T TL of 20 seconds. And by including this, what it's going to do is a token is going to be generated. That has a time to live of two hours and a use limit of two.
And then that another tokens gonna be created automatically. And this is the wrapping token. And in the in, that wrapping token will only have 20 seconds to live.
And then in that
tope wrapping tokens cubbyhole, we're going to throw this other token, which has the to our time to live.
And so the unwrapping process, what is going to do is it's going to access vault using this wrapping token, which can only be used once and has a very limited time line of life. And then it's going to retrieve from that wrapping tokens cubbyhole, another token which has itself two hours of access and and the other use limit.
And I can then use that other token. Once I've done the unwrapping
that other token to actually read the secrets from vault and perform all actions afforded to me by the gadget user and the default profiles
and running it, we immediately see Here's the wrapping token outputs a little different than we've done token create in the past. We only have 20 seconds so Let's go ahead and run the vault on rap Command and pass it the token i d.
And here we now have the rial token. So this vault on rap process this would have been something that James Bond was doing, not necessarily the person who created So I would have sent. James Bond is wrapping token. Hey, you only have 20 seconds. Hurry up, Go unwrapped this token. Now he has access to a token.
And if anybody comes back
after 20 seconds or after James has used the wrapping token and unwrapped that racket in token, it is no longer valid. In fact, we can come back here. Let's just try the unwrapping process again and we're going to get an air because of it was already used. And it's just a one time use thing, really limiting
the time period in which we've been exposed
to having somebody compromised. Even if this
rapping token itself, somehow was, was given to people in plain text way have another a lot of other safeguards above and beyond just the pure security of the token itself
and, of course, to bring everything full circle. Let's go ahead. Fault token equals I'm not using the wrapping tokens, right? I'm using the real token that was unwrapped. I'm going to now interface with vault, and I'm going to do so as a user that has a token which belongs to the gadget user
And I'm going to receive Goldfinger Gadget Secret, which tells me, Okay, there's a super laser.
So between the beginning lecture of this video and the hands on example war, helping our buddy James Bond out in his fictitious dilemma, I hope you have, ah, understanding of how response wrapping works, how it is under the covers where it's valuable for providing access to certain secrets.
And then, of course, in the video we wrapped a token.
And then we went ahead and we unwrapped a token that allowed us to get access to another token, which we then used to access a particular secret that was stored involved.
I look forward to seeing you on our next video where we take these concepts and start applying them in a very real world scenario.
Up Next