Skip to content

Latest commit

 

History

History
84 lines (56 loc) · 3.02 KB

HISTORY.md

File metadata and controls

84 lines (56 loc) · 3.02 KB

History of breaking changes

0.8.0

Managers now must implement Update(policy Policy) error.

0.7.0

Version 0.7.0 includes two minor BC breaks in the SQLManager. The method signature CreateSchemas() ( error) was changed to CreateSchemas(schema, table string) (int, error) where int now returns the number of migrations applied. Arguments schema and table are passed to the migration script, defining which schema and table name should be used to store and look up migration plans.

To keep the default values from the migrate package, use CreateSchemas("", ""). It is safe to reapply all migration commands with this version - implying that you can choose an arbitrary name and it won't break your schema.

0.6.0

Version 0.6.0 includes some larger BC breaks. This version focuses on various performance boosts for both in-memory and SQL adapters, removes some technical debt and restructures the repository.

New location

The location of this library changed from github.com/ory-am/ladon to github.com/ory/ladon.

Deprecating Redis and RethinkDB

Redis and RethinkDB are no longer maintained by ORY and were moved to ory/ladon-community. The adapters had various bugs and performance issues which is why they were removed from the official repository.

New packages

The SQLManager and MemoryManager moved to their own packages in ladon/manager/sql and ladon/manager/memory. This change was made to avoid pulling dependencies that are not required by the user.

IMPORTANT: SQL Changes

The SQLManager was rewritten completely. Now, the database is 3NF (normalized) and includes various improvements over the previous, naive adapter. The greatest challenge is matching regular expressions within SQL databases, which causes significant overhead.

While there is an auto-migration for the schema, the data is not automatically transferred to the new schema.

However, we provided a migration helper. For usage, check out xxx_manager_sql_migrator_test.go or this short example:

var db = getSqlDatabaseFromSomewhere()
s := NewSQLManager(db, nil)

if err := s.CreateSchemas(); err != nil {
    log.Fatalf("Could not create mysql schema: %v", err)
}

migrator := &SQLManagerMigrateFromMajor0Minor6ToMajor0Minor7{
    DB:db,
    SQLManager:s,
}

err := migrator.Migrate()

Please run this migrator only once and make back ups before you run it.

Manager API Changes

Manager.FindPoliciesForSubject is now Manager.FindRequestCandidates