This repository was archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 199
Config Refactor Round 2. #2771
Merged
nharper285
merged 36 commits into
microsoft:main
from
nharper285:user/noharper/config-endpoint-update-2
Jan 31, 2023
Merged
Config Refactor Round 2. #2771
Changes from 13 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
bf67175
Config Refactor Round 2.
nharper285 4b1a64e
Adding docs.
nharper285 fc1a86c
Fix file formatting.
nharper285 b8705fc
Removing.
nharper285 153f0b9
fixing imports.
nharper285 ec4a2fc
Removing.
nharper285 16b82e8
Fixing cli access token retrieval.
nharper285 ae9acaa
Fixing authority check.
nharper285 7d6c864
Merge branch 'main' into user/noharper/config-endpoint-update-2
nharper285 ae9b57f
Small edits.
nharper285 fb914dc
Merge branch 'user/noharper/config-endpoint-update-2' of https://gith…
nharper285 e7b9c5a
Removing duplicate.
nharper285 6073689
Adding uuid check.
nharper285 733840c
Possible to override with existing params.
nharper285 72669a6
Allowing flags to override storage.
nharper285 22f40fc
Trying to fix config params.?
nharper285 a83257e
Fixing.
nharper285 a4eb26d
Set endpoint params via app function.
nharper285 2e2ecc2
Checking changes to params.
nharper285 cd4f408
Make tenant_domain default.
nharper285 1e63be9
Merge branch 'main' into user/noharper/config-endpoint-update-2
nharper285 ffe8146
Remove endoint params from models.
nharper285 a5a6a54
UPdating docs.
nharper285 b5c3a74
Setting
nharper285 f184bc9
Removing hardcoded values.
nharper285 efe3a06
Typo.
nharper285 081b454
Removing endpoint upload.
nharper285 5fa1abc
Typo.
nharper285 dbe3f67
Fixing typos.
nharper285 794be7a
Fix error message about aad tenant.
nharper285 3b07e54
Merge branch 'main' into user/noharper/config-endpoint-update-2
nharper285 d78ac48
Responding to comments.
nharper285 7ac405c
Merge branch 'user/noharper/config-endpoint-update-2' of https://gith…
nharper285 c867a1c
Merge branch 'main' into user/noharper/config-endpoint-update-2
nharper285 ab844c8
Update src/ApiService/ApiService/UserCredentials.cs
nharper285 e5d1e2c
Merge branch 'main' into user/noharper/config-endpoint-update-2
nharper285 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| using System.Net; | ||
| using Microsoft.Azure.Functions.Worker; | ||
| using Microsoft.Azure.Functions.Worker.Http; | ||
|
|
||
| namespace Microsoft.OneFuzz.Service.Functions; | ||
|
|
||
| public class Config { | ||
| private readonly ILogTracer _log; | ||
| private readonly IOnefuzzContext _context; | ||
|
|
||
| public Config(ILogTracer log, IOnefuzzContext context) { | ||
| _log = log; | ||
| _context = context; | ||
| } | ||
|
|
||
| [Function("Config")] | ||
| public Async.Task<HttpResponseData> Run( | ||
| [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "config")] HttpRequestData req) { | ||
| return Get(req); | ||
| } | ||
| public async Async.Task<HttpResponseData> Get(HttpRequestData req) { | ||
| _log.Info($"getting endpoint config parameters"); | ||
| var config = await _context.ConfigOperations.Fetch(); | ||
|
|
||
| var endpointParams = new ConfigResponse( | ||
| Authority: config.Authority, | ||
| ClientId: config.ClientId, | ||
| TenantDomain: config.TenantDomain); | ||
|
|
||
| var response = req.CreateResponse(HttpStatusCode.OK); | ||
| await response.WriteAsJsonAsync(endpointParams); | ||
|
|
||
| return response; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,12 @@ | ||
| { | ||
| "tenant_id": "72f988bf-86f1-41af-91ab-2d7cd011db47", | ||
nharper285 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "tenant_domain": "azurewebsites.net", | ||
| "multi_tenant_domain": "", | ||
| "cli_client_id": "72f1562a-8c0c-41ea-beb9-fa2b71c80134", | ||
| "proxy_nsg_config": { | ||
| "allowed_ips": ["*"], | ||
| "allowed_ips": [ | ||
nharper285 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "*" | ||
| ], | ||
| "allowed_service_tags": [] | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.