What is the Secrets Management Block: Dapr in Action - Ep. 8
0 views
Aug 6, 2025
In this episode, you will understand what the Secrets Management building block is, what are some of its concrete component implementations and how you can use it in your own applications. 📺 CSharp TV - Dev Streaming Destination http://csharp.tv 🌎 C# Corner - Community of Software and Data Developers https://www.c-sharpcorner.com #CSharpTV #csharpcorner #Dapr #LiveShow
View Video Transcript
0:00
[Music]
0:18
[Music]
0:32
hi friends this is your host Rodrigo and
0:36
hi friends this is your host Rodrigo and
0:36
hi friends this is your host Rodrigo and today we're going to see the secrets
0:38
today we're going to see the secrets
0:38
today we're going to see the secrets management building block in
0:41
management building block in
0:41
management building block in Dapper so I'm changing the resolution
0:44
Dapper so I'm changing the resolution
0:44
Dapper so I'm changing the resolution here in my other
0:47
here in my other
0:47
here in my other monitor um and I'm going to switch the
0:52
monitor um and I'm going to switch the
0:52
monitor um and I'm going to switch the video to this other
0:54
video to this other
0:54
video to this other place hold
0:57
place hold
0:57
place hold on so let's present shares screen and
1:01
on so let's present shares screen and
1:01
on so let's present shares screen and yeah this is because I cleaned up my
1:04
yeah this is because I cleaned up my
1:04
yeah this is because I cleaned up my machine the other day and all the
1:07
machine the other day and all the
1:07
machine the other day and all the cookies and settings are gone
1:11
cookies and settings are gone
1:11
cookies and settings are gone fantastic okay
1:15
fantastic okay
1:15
fantastic okay so I'm sharing my screen now perfect so
1:19
so I'm sharing my screen now perfect so
1:19
so I'm sharing my screen now perfect so welcome to the Dapper in action series
1:23
welcome to the Dapper in action series
1:23
welcome to the Dapper in action series and this is Session
1:24
and this is Session
1:24
and this is Session 8 and you know secrets are quite C
1:29
8 and you know secrets are quite C
1:29
8 and you know secrets are quite C critical when you're building any kind
1:32
critical when you're building any kind
1:32
critical when you're building any kind of application
1:34
of application
1:34
of application since um it's not a good idea to share
1:38
since um it's not a good idea to share
1:38
since um it's not a good idea to share your connection strings your keys your
1:42
your connection strings your keys your
1:42
your connection strings your keys your secrets anywhere right it's not a very
1:45
secrets anywhere right it's not a very
1:45
secrets anywhere right it's not a very good idea to I don't know to commit your
1:49
good idea to I don't know to commit your
1:49
good idea to I don't know to commit your changes with all the connection strings
1:51
changes with all the connection strings
1:51
changes with all the connection strings and all the configuration files in the
1:55
and all the configuration files in the
1:55
and all the configuration files in the repo and that's not a quite very good
2:00
repo and that's not a quite very good
2:00
repo and that's not a quite very good idea right so the thing about the
2:03
idea right so the thing about the
2:03
idea right so the thing about the secrets management building block is
2:06
secrets management building block is
2:06
secrets management building block is that it allows you to use different
2:08
that it allows you to use different
2:08
that it allows you to use different secret stores such as the AWS Secrets
2:14
secret stores such as the AWS Secrets
2:14
secret stores such as the AWS Secrets manager Google has another one Hashi cor
2:18
manager Google has another one Hashi cor
2:18
manager Google has another one Hashi cor bold and Asher key VA and so on in a
2:22
bold and Asher key VA and so on in a
2:22
bold and Asher key VA and so on in a very straightforward way so you don't
2:25
very straightforward way so you don't
2:25
very straightforward way so you don't need to worry
2:27
need to worry
2:27
need to worry about um referencing nuget packages or
2:31
about um referencing nuget packages or
2:31
about um referencing nuget packages or libraries in your application and use
2:34
libraries in your application and use
2:34
libraries in your application and use those apis to get those secrets and
2:38
those apis to get those secrets and
2:38
those apis to get those secrets and manage the
2:40
manage the
2:40
manage the secrets so this is fantastic this is um
2:43
secrets so this is fantastic this is um
2:43
secrets so this is fantastic this is um congruent with the additional building
2:46
congruent with the additional building
2:46
congruent with the additional building blocks that we've seen in this series
2:48
blocks that we've seen in this series
2:48
blocks that we've seen in this series since you only use this dopper side card
2:52
since you only use this dopper side card
2:52
since you only use this dopper side card you only need to communicate to the
2:54
you only need to communicate to the
2:54
you only need to communicate to the Dapper side car and this piece of code
2:57
Dapper side car and this piece of code
2:57
Dapper side car and this piece of code is going to communicate to the The
2:59
is going to communicate to the The
3:00
is going to communicate to the The Secret store that you configure of
3:02
Secret store that you configure of
3:02
Secret store that you configure of course you need some kind of component
3:05
course you need some kind of component
3:05
course you need some kind of component you need a manifest file that you need
3:08
you need a manifest file that you need
3:08
you need a manifest file that you need to
3:09
to
3:09
to create and that's the place where you
3:12
create and that's the place where you
3:12
create and that's the place where you define where and what is the secret
3:16
define where and what is the secret
3:16
define where and what is the secret store that you're going to
3:18
store that you're going to
3:18
store that you're going to use
3:20
use
3:20
use right so quite easy stuff
3:24
right so quite easy stuff
3:24
right so quite easy stuff and let's move on there are many secret
3:28
and let's move on there are many secret
3:28
and let's move on there are many secret stores as I mentioned in right now and
3:31
stores as I mentioned in right now and
3:31
stores as I mentioned in right now and this is actually the screenshot from the
3:33
this is actually the screenshot from the
3:33
this is actually the screenshot from the diaper
3:34
diaper
3:34
diaper documentation from
3:36
documentation from
3:36
documentation from yesterday and you can see there are
3:39
yesterday and you can see there are
3:39
yesterday and you can see there are there are some generic ones such as the
3:42
there are some generic ones such as the
3:42
there are some generic ones such as the kubernetes secrets
3:45
kubernetes secrets
3:45
kubernetes secrets store and kubernetes itself it it
3:48
store and kubernetes itself it it
3:48
store and kubernetes itself it it doesn't have any kind of Secret store
3:50
doesn't have any kind of Secret store
3:50
doesn't have any kind of Secret store itself since it's
3:53
itself since it's
3:53
itself since it's only um keeping the secrets as a base 64
3:58
only um keeping the secrets as a base 64
3:58
only um keeping the secrets as a base 64 value it's it's not um you know it's not
4:03
value it's it's not um you know it's not
4:03
value it's it's not um you know it's not um encrypting those values and there are
4:08
um encrypting those values and there are
4:08
um encrypting those values and there are other secret stores quite useful such as
4:11
other secret stores quite useful such as
4:11
other secret stores quite useful such as the local environment variables one that
4:14
the local environment variables one that
4:14
the local environment variables one that I'm going to show you
4:15
I'm going to show you
4:15
I'm going to show you today I'm
4:17
today I'm
4:17
today I'm sorry I don't know why when I'm here in
4:21
sorry I don't know why when I'm here in
4:21
sorry I don't know why when I'm here in this office I'm always U cing maybe it's
4:25
this office I'm always U cing maybe it's
4:25
this office I'm always U cing maybe it's something about
4:27
something about
4:27
something about environment anyway
4:30
environment anyway
4:30
environment anyway I beg your
4:31
I beg your
4:31
I beg your pardon okay cool the thing is that you
4:35
pardon okay cool the thing is that you
4:35
pardon okay cool the thing is that you can use any kind of Secret store you can
4:37
can use any kind of Secret store you can
4:37
can use any kind of Secret store you can go ahead and navigate to those um Secret
4:42
go ahead and navigate to those um Secret
4:42
go ahead and navigate to those um Secret store um places let's copy
4:47
store um places let's copy
4:47
store um places let's copy this so let's see what happens if we
4:49
this so let's see what happens if we
4:50
this so let's see what happens if we navigate to this web
4:53
navigate to this web
4:53
navigate to this web application so I'm going to paste the
4:54
application so I'm going to paste the
4:54
application so I'm going to paste the value
4:56
value
4:56
value here
4:58
here
4:58
here and yeah you can see the different
5:01
and yeah you can see the different
5:01
and yeah you can see the different documentation files
5:03
documentation files
5:03
documentation files from
5:05
from
5:05
from sorry say I don't know lock environment
5:09
sorry say I don't know lock environment
5:09
sorry say I don't know lock environment variables this is the one that I'm going
5:10
variables this is the one that I'm going
5:10
variables this is the one that I'm going to show you today in addition to the AER
5:15
to show you today in addition to the AER
5:15
to show you today in addition to the AER keyable
5:16
keyable
5:16
keyable one and so you can see that this is a
5:20
one and so you can see that this is a
5:20
one and so you can see that this is a component
5:22
component
5:22
component object you know API version kind
5:25
object you know API version kind
5:26
object you know API version kind metadata
5:27
metadata
5:27
metadata spec and the kind is comp
5:30
spec and the kind is comp
5:30
spec and the kind is comp opponent I'm sorry oh my God my good
5:34
opponent I'm sorry oh my God my good
5:34
opponent I'm sorry oh my God my good friend Stephen was asking me hey are you
5:38
friend Stephen was asking me hey are you
5:38
friend Stephen was asking me hey are you okay how's health and I told him hey
5:41
okay how's health and I told him hey
5:41
okay how's health and I told him hey it's fine I'm feeling great and all of a
5:44
it's fine I'm feeling great and all of a
5:44
it's fine I'm feeling great and all of a sudden I'm scuffing I don't know if
5:47
sudden I'm scuffing I don't know if
5:47
sudden I'm scuffing I don't know if uh I don't know maybe I'm not that well
5:50
uh I don't know maybe I'm not that well
5:50
uh I don't know maybe I'm not that well you know I need some kind of uh sweet or
5:53
you know I need some kind of uh sweet or
5:54
you know I need some kind of uh sweet or any kind of uh I don't know glass of
5:56
any kind of uh I don't know glass of
5:56
any kind of uh I don't know glass of water or
5:57
water or
5:57
water or something um
5:59
something um
6:00
something um anyway bur with me
6:02
anyway bur with me
6:02
anyway bur with me friends uh so component this is the kind
6:05
friends uh so component this is the kind
6:05
friends uh so component this is the kind and then you have to specify the
6:07
and then you have to specify the
6:07
and then you have to specify the configuration just like any
6:10
configuration just like any
6:10
configuration just like any other building
6:12
other building
6:12
other building block I'm sorry oh my God yes I want to
6:16
block I'm sorry oh my God yes I want to
6:16
block I'm sorry oh my God yes I want to take a break my good friend Stephen I I
6:20
take a break my good friend Stephen I I
6:20
take a break my good friend Stephen I I have to go to pick um grab a cuple of
6:23
have to go to pick um grab a cuple of
6:23
have to go to pick um grab a cuple of water okay
6:30
[Music]
7:26
[Music]
7:26
[Music] all right I'm back
7:33
So
7:34
So
7:34
So yeah thank you very much for your
7:38
yeah thank you very much for your
7:38
yeah thank you very much for your time I have my glass of
7:45
water you know it's something about the
7:48
water you know it's something about the
7:48
water you know it's something about the environment maybe kind of a
7:51
environment maybe kind of a
7:51
environment maybe kind of a dust
7:54
anyway let's move
7:57
anyway let's move
7:57
anyway let's move on let's create
7:59
on let's create
7:59
on let's create a new
8:02
a new
8:02
a new project and let's name
8:07
it right here I'm going
8:10
it right here I'm going
8:10
it right here I'm going to create a new
8:15
application let's name this session
8:21
8
8:24
8
8:24
8 right and I want to create a new
8:28
right and I want to create a new
8:28
right and I want to create a new application that allows you
8:32
application that allows you
8:32
application that allows you to grab the secrets from the environment
8:37
to grab the secrets from the environment
8:37
to grab the secrets from the environment variables and you know what I already
8:43
variables and you know what I already
8:43
variables and you know what I already have in session
8:50
six or five
8:54
six or five
8:54
six or five bindings you might remember this
8:56
bindings you might remember this
8:56
bindings you might remember this application and let me see what's going
9:00
application and let me see what's going
9:00
application and let me see what's going on
9:01
on
9:01
on here we can see that this application
9:05
here we can see that this application
9:05
here we can see that this application it's using the of course the
9:09
it's using the of course the
9:09
it's using the of course the dopper side
9:12
dopper side
9:12
dopper side car
9:14
car
9:14
car and if I go
9:16
and if I go
9:16
and if I go here you might remember that we have
9:20
here you might remember that we have
9:20
here you might remember that we have this Crown
9:22
this Crown
9:22
this Crown binding and then it's using another
9:25
binding and then it's using another
9:25
binding and then it's using another binding for communicating to an open API
9:30
binding for communicating to an open API
9:30
binding for communicating to an open API I'm sorry open AI
9:33
I'm sorry open AI
9:33
I'm sorry open AI model that is in my AER AI Foundry
9:39
account
9:42
account
9:42
account so if I navigate to this component
9:46
so if I navigate to this component
9:46
so if I navigate to this component folder I can
9:49
folder I can
9:50
folder I can see this binding right that is firing
9:54
see this binding right that is firing
9:54
see this binding right that is firing every 5
9:55
every 5
9:55
every 5 seconds and this other
9:57
seconds and this other
9:57
seconds and this other one open AI
10:01
Jamal you can see that I'm specifying
10:04
Jamal you can see that I'm specifying
10:04
Jamal you can see that I'm specifying the API key directly in the Manifest
10:07
the API key directly in the Manifest
10:07
the API key directly in the Manifest file and this is not a bright
10:11
file and this is not a bright
10:11
file and this is not a bright idea right
10:14
idea right
10:14
idea right since I'm sorry I'm going to pause the
10:17
since I'm sorry I'm going to pause the
10:17
since I'm sorry I'm going to pause the video
10:23
here I'm
10:25
here I'm
10:25
here I'm back oh my God so
10:29
back oh my God so
10:29
back oh my God so the API key is directly specified here
10:32
the API key is directly specified here
10:32
the API key is directly specified here in the file not a good idea so let's
10:37
in the file not a good idea so let's
10:37
in the file not a good idea so let's take this entire application and let's
10:40
take this entire application and let's
10:40
take this entire application and let's use the secret
10:42
use the secret
10:42
use the secret management building
10:44
management building
10:44
management building block
10:46
block
10:46
block so let's see what happens okay so let's
10:49
so let's see what happens okay so let's
10:49
so let's see what happens okay so let's open up this
10:53
solution
10:56
solution
10:56
solution and first let's see what's going on
11:00
and first let's see what's going on
11:00
and first let's see what's going on here it's already opened in visual
11:03
here it's already opened in visual
11:03
here it's already opened in visual studio so let's execute
11:07
studio so let's execute
11:07
studio so let's execute this
11:09
this
11:09
this application let's run the Dapper side
11:13
application let's run the Dapper side
11:13
application let's run the Dapper side car so the application is going to be
11:16
car so the application is going to be
11:16
car so the application is going to be secrets and then Dapper HTTP Port let's
11:21
secrets and then Dapper HTTP Port let's
11:21
secrets and then Dapper HTTP Port let's say
11:23
say
11:23
say 55,000 and then HTTP
11:27
55,000 and then HTTP
11:27
55,000 and then HTTP Port let's use 55
11:30
Port let's use 55
11:30
Port let's use 55 0 components path is going to
11:34
0 components path is going to
11:34
0 components path is going to be
11:36
be
11:36
be components this folder that is in the
11:39
components this folder that is in the
11:39
components this folder that is in the previous um
11:42
previous um
11:42
previous um um in the previous uh folder right and
11:47
um in the previous uh folder right and
11:47
um in the previous uh folder right and then net
11:50
then net
11:50
then net Ron URLs and
11:53
Ron URLs and
11:53
Ron URLs and then 5500
11:58
Z so of course I need to execute this
12:03
Z so of course I need to execute this
12:03
Z so of course I need to execute this right
12:05
right
12:05
right here and let's change the components
12:08
here and let's change the components
12:08
here and let's change the components path I think this is the correct place
12:11
path I think this is the correct place
12:11
path I think this is the correct place let me see what's going
12:13
let me see what's going
12:13
let me see what's going on so that Run net
12:18
on so that Run net
12:18
on so that Run net run and there's something wrong with
12:22
run and there's something wrong with
12:22
run and there's something wrong with my yeah HTTP Port it's going to be app
12:27
my yeah HTTP Port it's going to be app
12:27
my yeah HTTP Port it's going to be app Port application port
12:30
Port application port
12:30
Port application port correct so it's running in other words
12:33
correct so it's running in other words
12:33
correct so it's running in other words I'm running the Dapper side car along
12:35
I'm running the Dapper side car along
12:35
I'm running the Dapper side car along the
12:37
the
12:37
the application and this is the bindings
12:40
application and this is the bindings
12:40
application and this is the bindings application right and the thing is that
12:44
application right and the thing is that
12:44
application right and the thing is that is returning this 401 error since I
12:50
is returning this 401 error since I
12:50
is returning this 401 error since I changed the API key the other
12:55
day but you know I don't want to
13:00
day but you know I don't want to
13:00
day but you know I don't want to modify the
13:01
modify the
13:01
modify the component uh you know the Manifest file
13:05
component uh you know the Manifest file
13:05
component uh you know the Manifest file directly I already have that environment
13:08
directly I already have that environment
13:08
directly I already have that environment variable right
13:10
variable right
13:10
variable right here which is Asher o
13:13
here which is Asher o
13:13
here which is Asher o AI uncore
13:17
AI uncore
13:17
AI uncore key this
13:18
key this
13:18
key this one so you can see that this is
13:21
one so you can see that this is
13:22
one so you can see that this is different
13:24
different
13:24
different than this one
13:26
than this one
13:26
than this one right two different values
13:29
right two different values
13:30
right two different values and this is the correct one but I have
13:32
and this is the correct one but I have
13:32
and this is the correct one but I have it in my environment
13:34
it in my environment
13:34
it in my environment variables
13:36
variables
13:36
variables so what can we do let's move
13:40
so what can we do let's move
13:41
so what can we do let's move on let's navigate to this
13:46
on let's navigate to this
13:46
on let's navigate to this documentation and we can use this local
13:49
documentation and we can use this local
13:49
documentation and we can use this local environment
13:51
environment
13:51
environment variables uh
13:53
variables uh
13:53
variables uh component I'm going to paste I'm sorry
13:56
component I'm going to paste I'm sorry
13:56
component I'm going to paste I'm sorry I'm going to copy everything and then
13:58
I'm going to copy everything and then
13:58
I'm going to copy everything and then paste the contents in a new manifest
14:02
paste the contents in a new manifest
14:02
paste the contents in a new manifest file so let's
14:06
file so let's
14:06
file so let's create a new manifest
14:11
file let's use Visual Studio
14:16
code
14:17
code
14:17
code so secrets.
14:22
jamoo and this is the
14:26
jamoo and this is the
14:26
jamoo and this is the contents so
14:30
contents so
14:30
contents so this is the most important thing this is
14:32
this is the most important thing this is
14:32
this is the most important thing this is the technical name for the secrets
14:37
the technical name for the secrets
14:37
the technical name for the secrets component that we're going to
14:39
component that we're going to
14:39
component that we're going to use and the name is inar Secret
14:52
store I'm sorry about that so let's
14:56
store I'm sorry about that so let's
14:56
store I'm sorry about that so let's change the name to something simpler
15:00
change the name to something simpler
15:00
change the name to something simpler such as my
15:03
such as my
15:03
such as my secrets right this is the type secret
15:06
secrets right this is the type secret
15:06
secrets right this is the type secret storage. local.
15:08
storage. local.
15:08
storage. local. environment and that's it I think you
15:10
environment and that's it I think you
15:11
environment and that's it I think you can
15:11
can
15:11
can configure a prefix that all your
15:14
configure a prefix that all your
15:14
configure a prefix that all your environment variables have if you happen
15:18
environment variables have if you happen
15:18
environment variables have if you happen to be using that kind of a um structure
15:22
to be using that kind of a um structure
15:22
to be using that kind of a um structure in your names in this case the name is
15:26
in your names in this case the name is
15:26
in your names in this case the name is Asher o Ai and the one that I showed
15:29
Asher o Ai and the one that I showed
15:29
Asher o Ai and the one that I showed before Asher oi key
15:34
before Asher oi key
15:34
before Asher oi key Okay Okay cool so I have this component
15:38
Okay Okay cool so I have this component
15:38
Okay Okay cool so I have this component so far so good let's go back to the
15:41
so far so good let's go back to the
15:41
so far so good let's go back to the terminal that is right
15:43
terminal that is right
15:43
terminal that is right here and
15:46
here and
15:46
here and now we need to modify the open a. jaml
15:51
now we need to modify the open a. jaml
15:51
now we need to modify the open a. jaml component let's go back to visual studio
15:53
component let's go back to visual studio
15:53
component let's go back to visual studio I forgot to do that because I want to
15:56
I forgot to do that because I want to
15:56
I forgot to do that because I want to reference this Secret store right here
16:01
so if you happen to be a kubernetes
16:05
so if you happen to be a kubernetes
16:05
so if you happen to be a kubernetes developer or
16:07
developer or
16:07
developer or administrator you know that we have the
16:10
administrator you know that we have the
16:10
administrator you know that we have the secrets in
16:13
secrets in
16:13
secrets in the
16:15
the
16:15
the um config values uh places that we can
16:19
um config values uh places that we can
16:19
um config values uh places that we can use for specifying configurations
16:22
use for specifying configurations
16:22
use for specifying configurations right so in a very similar fashion you
16:26
right so in a very similar fashion you
16:26
right so in a very similar fashion you can use the secret key key ref right
16:31
can use the secret key key ref right
16:31
can use the secret key key ref right here
16:33
here
16:33
here so instead of using the value directly
16:36
so instead of using the value directly
16:36
so instead of using the value directly I'm going to specify a secret key
16:40
I'm going to specify a secret key
16:40
I'm going to specify a secret key ref okay so I need to go back to the
16:46
documentation I'm
16:49
documentation I'm
16:49
documentation I'm sorry and I just need to know if I need
16:53
sorry and I just need to know if I need
16:53
sorry and I just need to know if I need to specify
16:55
to specify
16:55
to specify other um element
16:59
other um element
16:59
other um element so I'm goingon to I'm going to click
17:02
so I'm goingon to I'm going to click
17:02
so I'm goingon to I'm going to click this uh link and yes off and then Secret
17:07
this uh link and yes off and then Secret
17:07
this uh link and yes off and then Secret store Secret store name that's the first
17:09
store Secret store name that's the first
17:09
store Secret store name that's the first one so off Secret
17:14
one so off Secret
17:14
one so off Secret store and the name
17:18
is uh my secrets
17:21
is uh my secrets
17:21
is uh my secrets right my secrets so that's the first
17:25
right my secrets so that's the first
17:25
right my secrets so that's the first change that I need to implement here
17:29
change that I need to implement here
17:29
change that I need to implement here then I need to
17:30
then I need to
17:30
then I need to specify the secret key
17:34
specify the secret key
17:34
specify the secret key ref so instead of
17:37
ref so instead of
17:37
ref so instead of value secret key
17:41
value secret key
17:41
value secret key ref and thankfully I have
17:44
ref and thankfully I have
17:44
ref and thankfully I have co-pilot and this is you know
17:47
co-pilot and this is you know
17:47
co-pilot and this is you know suggesting uh this structure and the
17:51
suggesting uh this structure and the
17:51
suggesting uh this structure and the name is going to be Asher what was
17:56
it Asher oi I underscore
18:00
it Asher oi I underscore
18:00
it Asher oi I underscore key
18:02
key
18:02
key right and let's use this let's use
18:08
right and let's use this let's use
18:08
right and let's use this let's use this let's see if that is enough okay so
18:12
this let's see if that is enough okay so
18:13
this let's see if that is enough okay so in other words you're referencing the
18:16
in other words you're referencing the
18:16
in other words you're referencing the secrets component in this other
18:19
secrets component in this other
18:19
secrets component in this other component which is the binding for the
18:23
component which is the binding for the
18:23
component which is the binding for the open
18:24
open
18:24
open AI
18:26
AI
18:26
AI um um large language models are running
18:29
um um large language models are running
18:29
um um large language models are running in my aser AI Foundry
18:32
in my aser AI Foundry
18:32
in my aser AI Foundry account right so there's no need for me
18:34
account right so there's no need for me
18:34
account right so there's no need for me to use the API key right
18:39
to use the API key right
18:39
to use the API key right here in this same sense and in this same
18:42
here in this same sense and in this same
18:43
here in this same sense and in this same fashion you can store connection strings
18:46
fashion you can store connection strings
18:46
fashion you can store connection strings any kind of API key which is a secret
18:49
any kind of API key which is a secret
18:49
any kind of API key which is a secret thing um I don't know any kind of a
18:55
thing um I don't know any kind of a
18:55
thing um I don't know any kind of a sensitive uh thing for your application
19:00
Okay cool so let's go back to the
19:04
Okay cool so let's go back to the
19:04
Okay cool so let's go back to the terminal and let's see if this is
19:08
terminal and let's see if this is
19:08
terminal and let's see if this is running let's navigate to binding
19:13
running let's navigate to binding
19:13
running let's navigate to binding themo Dapper run appid drer HTTP Port
19:19
themo Dapper run appid drer HTTP Port
19:19
themo Dapper run appid drer HTTP Port the application Port the components
19:22
the application Port the components
19:22
the application Port the components path which is a folder where all the
19:25
path which is a folder where all the
19:25
path which is a folder where all the Manifest files are uh stored in then
19:30
Manifest files are uh stored in then
19:30
Manifest files are uh stored in then Double Dash and your specific
19:34
Double Dash and your specific
19:34
Double Dash and your specific application um settings and commands for
19:37
application um settings and commands for
19:37
application um settings and commands for running the application
19:41
itself so let's execute this and let's
19:45
itself so let's execute this and let's
19:45
itself so let's execute this and let's see if this is going to be enough the
19:50
see if this is going to be enough the
19:50
see if this is going to be enough the Cron job binding
19:51
Cron job binding
19:51
Cron job binding fires and then the open a open AI
19:56
fires and then the open a open AI
19:56
fires and then the open a open AI binding is trying to communicate
20:00
binding is trying to communicate
20:00
binding is trying to communicate to the you know to the large language
20:02
to the you know to the large language
20:02
to the you know to the large language model and of course I'm receiving those
20:05
model and of course I'm receiving those
20:05
model and of course I'm receiving those values correctly this time since the API
20:09
values correctly this time since the API
20:09
values correctly this time since the API key is
20:10
key is
20:11
key is valid
20:12
valid
20:12
valid however the API key is no longer in my
20:16
however the API key is no longer in my
20:16
however the API key is no longer in my manifest files is inside the environment
20:21
manifest files is inside the environment
20:21
manifest files is inside the environment variables in this
20:23
variables in this
20:23
variables in this machine so if you're wondering what kind
20:25
machine so if you're wondering what kind
20:25
machine so if you're wondering what kind of uh prompt I'm
20:27
of uh prompt I'm
20:27
of uh prompt I'm sending what The Prompt is very
20:31
sending what The Prompt is very
20:31
sending what The Prompt is very simple uh it is
20:35
simple uh it is
20:35
simple uh it is actually um let's go here and
20:43
controllers and what are the largest
20:45
controllers and what are the largest
20:45
controllers and what are the largest cities in the
20:46
cities in the
20:47
cities in the world and I'm that's why I'm resuming
20:49
world and I'm that's why I'm resuming
20:49
world and I'm that's why I'm resuming that you know Json
20:52
that you know Json
20:52
that you know Json document and maybe I can go ahead and
20:56
document and maybe I can go ahead and
20:56
document and maybe I can go ahead and change the prompt to say ay just return
21:01
change the prompt to say ay just return
21:01
change the prompt to say ay just return the
21:02
the
21:02
the list you know as a bulleted list instead
21:06
list you know as a bulleted list instead
21:07
list you know as a bulleted list instead of a
21:07
of a
21:07
of a document uh anyway
21:10
document uh anyway
21:10
document uh anyway that's the prompt and this is um working
21:15
that's the prompt and this is um working
21:15
that's the prompt and this is um working this is
21:16
this is
21:16
this is perfect this is perfect and this is um
21:20
perfect this is perfect and this is um
21:20
perfect this is perfect and this is um great when you're building and your
21:23
great when you're building and your
21:23
great when you're building and your dopper application and you are in the
21:26
dopper application and you are in the
21:26
dopper application and you are in the development phase
21:29
development phase
21:29
development phase since you don't need to you know store
21:32
since you don't need to you know store
21:32
since you don't need to you know store those uh secrets in the
21:34
those uh secrets in the
21:34
those uh secrets in the repo and I think this is this is uh
21:39
repo and I think this is this is uh
21:39
repo and I think this is this is uh fantastic so let's go back to the web
21:42
fantastic so let's go back to the web
21:42
fantastic so let's go back to the web browser and it looks like I'm no longer
21:46
browser and it looks like I'm no longer
21:46
browser and it looks like I'm no longer coughing
21:48
anymore and you can see here right there
21:53
anymore and you can see here right there
21:53
anymore and you can see here right there I have my air
21:56
conditioner uh some people installed
21:58
conditioner uh some people installed
21:58
conditioner uh some people installed that air conditioner unit the other
22:01
that air conditioner unit the other
22:01
that air conditioner unit the other day um and I think it's going to it's
22:04
day um and I think it's going to it's
22:04
day um and I think it's going to it's related to that
22:08
related to that
22:08
related to that anyway cool cool cool cool cool perfect
22:12
anyway cool cool cool cool cool perfect
22:12
anyway cool cool cool cool cool perfect let's go back to the
22:16
presentation so you can use different
22:18
presentation so you can use different
22:18
presentation so you can use different secret
22:19
secret
22:19
secret stores uh I'm just showing you today the
22:22
stores uh I'm just showing you today the
22:22
stores uh I'm just showing you today the local environment variables
22:25
local environment variables
22:25
local environment variables one since it's um available
22:29
one since it's um available
22:29
one since it's um available now and it's fantastic remember that
22:33
now and it's fantastic remember that
22:33
now and it's fantastic remember that nowadays at at the time of this
22:34
nowadays at at the time of this
22:34
nowadays at at the time of this recording the latest version of dapper
22:37
recording the latest version of dapper
22:37
recording the latest version of dapper is
22:41
1.14 and I think the team is working
22:44
1.14 and I think the team is working
22:44
1.14 and I think the team is working very hard to uh release
22:48
very hard to uh release
22:48
very hard to uh release 1.5 uh
22:53
soon
22:55
soon
22:55
soon fantastic so remember that of course you
22:58
fantastic so remember that of course you
22:58
fantastic so remember that of course you can
22:59
can
22:59
can also grab the secret by using the Dapper
23:03
also grab the secret by using the Dapper
23:03
also grab the secret by using the Dapper side card in other words let's go back
23:09
side card in other words let's go back
23:09
side card in other words let's go back here
23:11
here
23:11
here and so this is the same application that
23:14
and so this is the same application that
23:14
and so this is the same application that I'm showing
23:16
I'm showing
23:16
I'm showing you and of course you don't need to
23:18
you and of course you don't need to
23:18
you and of course you don't need to change the code at all right because you
23:23
change the code at all right because you
23:23
change the code at all right because you just configured and
23:25
just configured and
23:25
just configured and referenced The Secret store in your uh
23:30
referenced The Secret store in your uh
23:30
referenced The Secret store in your uh binding
23:31
binding
23:31
binding component but of course you can also use
23:36
component but of course you can also use
23:36
component but of course you can also use this dopper client and then get secret
23:39
this dopper client and then get secret
23:39
this dopper client and then get secret async then you pass the store
23:42
async then you pass the store
23:42
async then you pass the store name my secrets and then the key Asher
23:47
name my secrets and then the key Asher
23:47
name my secrets and then the key Asher opening eye
23:49
opening eye
23:49
opening eye key and that's
23:51
key and that's
23:51
key and that's it bar result equals weight and you know
23:56
it bar result equals weight and you know
23:56
it bar result equals weight and you know the drill right
23:59
the drill right
23:59
the drill right and I think this is great when
24:02
and I think this is great when
24:02
and I think this is great when you of course need to store something
24:05
you of course need to store something
24:05
you of course need to store something that is a secret and it's a
24:07
that is a secret and it's a
24:07
that is a secret and it's a sensitive uh
24:09
sensitive uh
24:09
sensitive uh value and it's no needed you don't need
24:13
value and it's no needed you don't need
24:13
value and it's no needed you don't need to use it in other component right for
24:17
to use it in other component right for
24:17
to use it in other component right for example it could be I don't know a list
24:20
example it could be I don't know a list
24:20
example it could be I don't know a list of I don't know a list of names or maybe
24:24
of I don't know a list of names or maybe
24:24
of I don't know a list of names or maybe a connection string itself that you
24:27
a connection string itself that you
24:27
a connection string itself that you don't have component
24:30
don't have component
24:30
don't have component for who knows the thing is that you can
24:33
for who knows the thing is that you can
24:33
for who knows the thing is that you can also use this and it's a very uh easy
24:37
also use this and it's a very uh easy
24:37
also use this and it's a very uh easy easy thing to
24:40
easy thing to
24:40
easy thing to do so let's talk about a little bit
24:43
do so let's talk about a little bit
24:43
do so let's talk about a little bit about uh uh Asher
24:49
keyboard
24:50
keyboard
24:50
keyboard and right
24:54
here so in this other case you need to
24:59
here so in this other case you need to
24:59
here so in this other case you need to create of course the Azure keyboard
25:13
itself I'm back and also you need to
25:17
itself I'm back and also you need to
25:17
itself I'm back and also you need to create a service
25:20
create a service
25:20
create a service principle if you happen to be a Nal
25:23
principle if you happen to be a Nal
25:23
principle if you happen to be a Nal developer or
25:25
developer or
25:25
developer or architect well you know that you need to
25:27
architect well you know that you need to
25:27
architect well you know that you need to register the application and then you
25:30
register the application and then you
25:30
register the application and then you need to create the service
25:32
need to create the service
25:32
need to create the service principle and you need to obtain the ID
25:36
principle and you need to obtain the ID
25:36
principle and you need to obtain the ID that was created when you registered
25:39
that was created when you registered
25:39
that was created when you registered that
25:40
that
25:41
that application and then you use this um
25:45
application and then you use this um
25:45
application and then you use this um manifest that I'm showing you right
25:49
now and you can see the type is secret
25:52
now and you can see the type is secret
25:52
now and you can see the type is secret stores doer.
25:55
stores doer.
25:55
stores doer. keyboard and the keyboard name
25:58
keyboard and the keyboard name
25:58
keyboard and the keyboard name let's say dopper in action
26:01
let's say dopper in action
26:01
let's say dopper in action right the Asher environment um value has
26:05
right the Asher environment um value has
26:05
right the Asher environment um value has to be Asher public
26:12
Cloud oh my God and then AER 10 and ID
26:17
Cloud oh my God and then AER 10 and ID
26:17
Cloud oh my God and then AER 10 and ID that's your service principal 10an ID
26:19
that's your service principal 10an ID
26:19
that's your service principal 10an ID that is returned when you register the
26:23
that is returned when you register the
26:23
that is returned when you register the application and
26:24
application and
26:24
application and also I'm sorry the tenan ID is something
26:27
also I'm sorry the tenan ID is something
26:27
also I'm sorry the tenan ID is something that you know
26:28
that you know
26:28
that you know beforehand and the Asher client ID is
26:33
beforehand and the Asher client ID is
26:33
beforehand and the Asher client ID is the one that is returned when you
26:34
the one that is returned when you
26:34
the one that is returned when you register the application so you specify
26:37
register the application so you specify
26:37
register the application so you specify those two values and then you specify
26:41
those two values and then you specify
26:41
those two values and then you specify the path for your certificate
26:44
the path for your certificate
26:44
the path for your certificate file and that's
26:47
file and that's
26:47
file and that's it and just remember and just take into
26:50
it and just remember and just take into
26:51
it and just remember and just take into account that this is the only way you
26:53
account that this is the only way you
26:53
account that this is the only way you can use asure KEYT I believe
26:58
can use asure KEYT I believe
26:58
can use asure KEYT I believe I don't know if I'm I'm remembering
27:01
I don't know if I'm I'm remembering
27:01
I don't know if I'm I'm remembering correctly uh some years ago you could
27:05
correctly uh some years ago you could
27:05
correctly uh some years ago you could use some kind of uh key or connection
27:10
use some kind of uh key or connection
27:10
use some kind of uh key or connection string for your key Vault when using
27:13
string for your key Vault when using
27:13
string for your key Vault when using that component in Dapper maybe I'm
27:17
that component in Dapper maybe I'm
27:17
that component in Dapper maybe I'm mistaken anyway today that's the only
27:21
mistaken anyway today that's the only
27:21
mistaken anyway today that's the only way and when we touch the you know uh
27:28
way and when we touch the you know uh
27:28
way and when we touch the you know uh deployment
27:29
deployment
27:29
deployment topics we're going to return to this one
27:34
topics we're going to return to this one
27:34
topics we're going to return to this one since I I want to use Microsoft entry
27:38
since I I want to use Microsoft entry
27:38
since I I want to use Microsoft entry ID and uh for
27:41
ID and uh for
27:41
ID and uh for communicating to the Asher key and using
27:44
communicating to the Asher key and using
27:44
communicating to the Asher key and using those Secrets when deploying the
27:47
those Secrets when deploying the
27:47
those Secrets when deploying the application to kubernetes or AER
27:50
application to kubernetes or AER
27:50
application to kubernetes or AER container
27:51
container
27:51
container apps okay just take into account that
27:55
apps okay just take into account that
27:55
apps okay just take into account that you have this option only
27:59
you have this option only
27:59
you have this option only for authenticating with Microsoft and
28:06
trading so so far so
28:09
trading so so far so
28:09
trading so so far so good I believe this is it this is
28:14
good I believe this is it this is
28:14
good I believe this is it this is the uh topic about Secrets
28:17
the uh topic about Secrets
28:18
the uh topic about Secrets management and you can also use um you
28:21
management and you can also use um you
28:22
management and you can also use um you know the endpoint itself if you happen
28:24
know the endpoint itself if you happen
28:24
know the endpoint itself if you happen to be using an HTTP
28:26
to be using an HTTP
28:26
to be using an HTTP request you you use the V1 or grpc for
28:30
request you you use the V1 or grpc for
28:30
request you you use the V1 or grpc for that for that matter uh you use this URL
28:34
that for that matter uh you use this URL
28:34
that for that matter uh you use this URL this is the name or endpoint for
28:36
this is the name or endpoint for
28:36
this is the name or endpoint for obtaining the secrets and getting access
28:39
obtaining the secrets and getting access
28:39
obtaining the secrets and getting access to the
28:40
to the
28:40
to the secrets
28:42
secrets
28:42
secrets and again I've mentioned this before I
28:45
and again I've mentioned this before I
28:45
and again I've mentioned this before I don't think that's a real world
28:48
don't think that's a real world
28:48
don't think that's a real world situation since you have quite powerful
28:52
situation since you have quite powerful
28:52
situation since you have quite powerful ASD case for a lot of different
28:56
ASD case for a lot of different
28:56
ASD case for a lot of different programming languages and Frameworks
28:58
programming languages and Frameworks
28:58
programming languages and Frameworks such as the net
29:02
one and
29:05
one and
29:05
one and yeah uh let's call it a day
29:09
yeah uh let's call it a day
29:09
yeah uh let's call it a day friends uh
29:10
friends uh
29:10
friends uh Secrets
29:12
Secrets
29:12
Secrets Don't Put your secrets in your
29:15
Don't Put your secrets in your
29:15
Don't Put your secrets in your repo don't put your secrets in your
29:18
repo don't put your secrets in your
29:18
repo don't put your secrets in your application settings. Json files or any
29:21
application settings. Json files or any
29:21
application settings. Json files or any other configuration for your specific
29:24
other configuration for your specific
29:24
other configuration for your specific programming
29:25
programming
29:25
programming languages um instead use an uh um secure
29:31
languages um instead use an uh um secure
29:31
languages um instead use an uh um secure place for storing the secrets such as uh
29:34
place for storing the secrets such as uh
29:34
place for storing the secrets such as uh the aure keyb or the AWS one or Google
29:38
the aure keyb or the AWS one or Google
29:38
the aure keyb or the AWS one or Google and so on and for development purposes
29:43
and so on and for development purposes
29:43
and so on and for development purposes you can also use the local
29:45
you can also use the local
29:45
you can also use the local environment uh
29:46
environment uh
29:46
environment uh variables uh Secrets
29:49
variables uh Secrets
29:49
variables uh Secrets component just like I showed you
29:54
component just like I showed you
29:54
component just like I showed you today perfect so uh I believe that that
29:58
today perfect so uh I believe that that
29:58
today perfect so uh I believe that that is it that is it um next time we're
30:01
is it that is it um next time we're
30:01
is it that is it um next time we're going to see other fantastic build
30:04
going to see other fantastic build
30:04
going to see other fantastic build building
30:05
building
30:05
building blocks and thank you for your time and
30:08
blocks and thank you for your time and
30:08
blocks and thank you for your time and see you in the next session
30:11
see you in the next session
30:11
see you in the next session [Music]
#Programming
#Windows & .NET