Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: ODS/API release notes

...

Alternately, you can get the source code from https://github.com/Ed-Fi-Alliance/Ed-Fi-Databases and checkout tag 1.0.0-alpha-2 alpha2  or tag roadrunner-alpha2.

New Deploy Verb

For detailed examples, run the tool with no arguments provided and view the output, or see the readme.

...

Code Block
EdFi.Db.Deploy whatif -d ODS -c "server=localhost;database=EdFi_ODS;integrated security=sspi" -p SqlServer

# Check $LASTEXITCODE for 1 or 0

Coming Soon

...

ODS/API

Authentication an authorization are now working on PostgreSQL. Check out the roadrunner-alpha2  tags in the three repositories Ed-Fi-Common, Ed-Fi-ODS, and Ed-Fi-ODS-Implementation. Be sure to install all three databases in PostgreSQL using the alpha 2 version of the DB Deploy tool (described above). If starting the ODS/API from Visual Studio, switch to the new "Npgsql" build configuration 

Image Added

Doing so will automatically transform the WebApi project's web.config file using Web.Npgsql.config to apply default settings. You will need to adjust the PostgreSQL connection strings in your copy of the Npgsql.config transform file to adjust your installation. This config transform shows all of the required configuration elements for a successful deployment to a server. Only startup Swagger and the WebAPI, as the sandbox Admin Web is not supported on PostgreSQL

In order to test the authentication and authorization processes, you will need to populate some data into the EdFi_Admin and EdFi_Security databases. There are two SQL scripts attached to ODS-3433 that will create very basic security data, including sample key/secret of "testKey" / "testSecret". Once you have run these two scripts in their respective databases, you can try authenticating and then posting to a resource endpoint. The POST should fail with 500 since the NHibernate mappings to the ODS are not set up yet. If you get a 401/403 then there is something wrong with the data setup in either the Admin or Security database.

Code Block
titleAuthenticate
POST http://localhost:54576/oauth/token HTTP/1.1
Host: localhost:54746
Content-Type: application/x-www-form-urlencoded
Authorization: Basic dGVzdEtleTp0ZXN0U2VjcmV0

grant_type=client_credentials

Capture bearer token from the response:

Code Block
languagejs
titleToken Response
{
  "access_token": "b519347ee4df46a1808ccf2b07a3db27",
  "expires_in": 1800,
  "token_type": "bearer"
}

Use that bearer token to perform a POST, and then confirm in the ODS/API log file that the ODS mappings are the source of the 500 (as desired/expected at this point).

Code Block
titlePost to AcademicWeek
POST http://localhost:54576/data/v3/ed-fi/academicWeeks HTTP/1.1
Host: localhost:54746
Content-Type: application/json
Authorization: Bearer b519347ee4df46a1808ccf2b07a3db27
Content-Length: 332

{
  "weekIdentifier": "asdfasdfasdf5",
  "schoolReference": {
    "schoolId": 255901001
  },
  "beginDate": "2011-02-22",
  "endDate": "2019-02-28",
  "totalInstructionalDays": 0
}

Coming Soon

  • NHibernate mappings for the ODS database on PostgreSQL.
  • Populated and minimal template data sets for PostgreSQL.

Providing Feedback

Have feedback on this pre-release code? Three available channels:

...