Skip to content

Commit b1e7e46

Browse files
Fixed issue with Fortify SSC connector not being able to connect to SSC with https enabled. I'll consider this to be v0.2-beta.
1 parent 290a6b6 commit b1e7e46

File tree

3 files changed

+36299
-1
lines changed

3 files changed

+36299
-1
lines changed

FortifySSC/FortifySSC.mproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
<Content Include="FortifySSC.query.pq">
7171
<SubType>Code</SubType>
7272
</Content>
73+
<Compile Include="ssc.json">
74+
<SubType>Content</SubType>
75+
</Compile>
7376
</ItemGroup>
7477
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
7578
<UsingTask TaskName="BuildExtension" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">

FortifySSC/FortifySSC.pq

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ shared FortifySSC.Contents = (optional message as text) =>
2121
TokenServiceUrl = BaseUrl & "/api/v1/tokens",
2222
ServiceJsonUrl = BaseUrl & "/api/v1/spec.json",
2323
headers = [ Authorization = "FortifyToken " & credential[Password] ],
24-
navTable = OpenApi.Document(Web.Contents(ServiceJsonUrl), [ Headers = headers, ManualCredentials = true, IncludeMoreColumns = true, IncludeExtensions = true ])
24+
//navTable = OpenApi.Document(Web.Contents(ServiceJsonUrl), [ Headers = headers, ManualCredentials = true, IncludeMoreColumns = true, IncludeExtensions = true ])
25+
26+
//Doing this because Fortify SSC (as of version 20.2) still does not include a value for schema. This causes issues when trying to connect to ssc with HTTPS enabled.
27+
json = Extension.Contents("ssc.json"),
28+
scheme = Text.Split(RootUrl, ":"){0},
29+
host = Text.Split(RootUrl,"/"){2},
30+
updatedJson = Text.Format(Text.FromBinary(json), {scheme, host}),
31+
navTable = OpenApi.Document(Text.ToBinary(updatedJson), [ Headers = headers, ManualCredentials = true, IncludeMoreColumns = false, IncludeExtensions = true ])
2532
in
2633
navTable;
2734

0 commit comments

Comments
 (0)